diff --git a/client/src/interfaces/ApiModels.ts b/client/src/interfaces/ApiModels.ts index a6fa68a0e9b58dcc63ad67d29884bbf3e781a64a..2734884b7783b662113dc00f61d112f8a58f5dd6 100644 --- a/client/src/interfaces/ApiModels.ts +++ b/client/src/interfaces/ApiModels.ts @@ -56,6 +56,7 @@ export interface Question extends NameID { slide_id: number total_score: number type_id: number + correcting_instructions: string } export interface QuestionAlternative { diff --git a/client/src/interfaces/ApiRichModels.ts b/client/src/interfaces/ApiRichModels.ts index b9ca9f333640071518a9f216e08a77af670eb153..253565a40e4ca4c8d0b1cc3597a58d5eb91cf2ec 100644 --- a/client/src/interfaces/ApiRichModels.ts +++ b/client/src/interfaces/ApiRichModels.ts @@ -36,5 +36,6 @@ export interface RichQuestion { total_score: number question_type: QuestionType type_id: number + correcting_instructions: string alternatives: QuestionAlternative[] } diff --git a/client/src/pages/presentationEditor/components/slideSettingsComponents/Instructions.tsx b/client/src/pages/presentationEditor/components/slideSettingsComponents/Instructions.tsx index 858dd75e65dc554cc6e1c2083f46873a925335a1..09279daeefa890c0fffa21b92bf3bc41b880c017 100644 --- a/client/src/pages/presentationEditor/components/slideSettingsComponents/Instructions.tsx +++ b/client/src/pages/presentationEditor/components/slideSettingsComponents/Instructions.tsx @@ -30,7 +30,7 @@ const Instructions = ({ activeSlide, competitionId }: InstructionsProps) => { .put( `/api/competitions/${competitionId}/slides/${activeSlide.id}/questions/${activeSlide.questions[0].id}`, { - instructions: event.target.value, + correcting_instructions: event.target.value, } ) .then(() => { @@ -56,7 +56,7 @@ const Instructions = ({ activeSlide, competitionId }: InstructionsProps) => { <Center> <TextField id="outlined-basic" - defaultValue={''} + defaultValue={activeSlide.questions[0].correcting_instructions} onChange={updateInstructionsText} variant="outlined" fullWidth={true} diff --git a/client/src/pages/views/components/JudgeScoringInstructions.tsx b/client/src/pages/views/components/JudgeScoringInstructions.tsx index 3cc803194a9754bea8a9b23b3f2b073d6547c05c..1865ccf2ea886f871754562703bff0a6d3dd6e38 100644 --- a/client/src/pages/views/components/JudgeScoringInstructions.tsx +++ b/client/src/pages/views/components/JudgeScoringInstructions.tsx @@ -20,7 +20,7 @@ const JudgeScoringInstructions = ({ question }: JudgeScoringInstructionsProps) = return ( <JudgeScoringInstructionsContainer elevation={3}> <Typography variant="h4">Rättningsinstruktioner</Typography> - <Typography variant="body1">Såhär rättar du denhär frågan</Typography> + <Typography variant="body1">{question.correcting_instructions}</Typography> </JudgeScoringInstructionsContainer> ) }