Skip to content

Commit 945ed1a

Browse files
committed
link to discussions
1 parent 3a9609e commit 945ed1a

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

src/client/components/Courses/Course/index.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,28 @@ const Course = () => {
296296

297297
{courseEnabled && <MaxTokenUsageStudents course={course} />}
298298

299+
{course.saveDiscussions && (
300+
<Paper
301+
variant="outlined"
302+
sx={{
303+
padding: '2%',
304+
mt: 2,
305+
width: '100%',
306+
}}
307+
>
308+
<Typography variant="h6">Tutkimuskurssi</Typography>
309+
<Alert severity="warning" style={{ marginTop: 20, marginBottom: 20 }}>
310+
<Typography>
311+
Kurssin keskustelut talletetaan anonyymisti jos käyttäjä antaa
312+
luvan
313+
</Typography>
314+
</Alert>
315+
<Link to={`/courses/${id}/discussions`}>
316+
Näytä talletetut keskustelut <OpenInNew fontSize="small" />
317+
</Link>
318+
</Paper>
319+
)}
320+
299321
{prompts.map((prompt) => (
300322
<Prompt
301323
key={prompt.id}

src/server/routes/openai.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,7 @@ openaiRouter.post('/stream', upload.single('file'), async (r, res) => {
172172
courseId && course.saveDiscussions && options.saveConsent
173173

174174
// eslint-disable-next-line no-console
175-
console.log(
176-
'consentToSave',
177-
consentToSave,
178-
options.saveConsent,
179-
user.username
180-
)
175+
console.log('consentToSave', options.saveConsent, user.username)
181176

182177
if (consentToSave) {
183178
const discussion = {

0 commit comments

Comments
 (0)