Skip to content

Commit

Permalink
Programming exercises: Fix edge case in rendering of programming exer…
Browse files Browse the repository at this point in the history
…cise problem statements (ls1intum#4683)
  • Loading branch information
Hialus authored Feb 8, 2022
1 parent ca1eef2 commit 20e11ff
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ export class ExerciseDetailsComponent implements OnInit {
*/
ngOnInit() {
this.formattedGradingInstructions = this.artemisMarkdown.safeHtmlForMarkdown(this.exercise.gradingInstructions);
this.formattedProblemStatement = this.artemisMarkdown.safeHtmlForMarkdown(this.exercise.problemStatement);
if (this.exercise.type === ExerciseType.PROGRAMMING) {
this.programmingExercise = this.exercise as ProgrammingExercise;
} else {
// Do not render the markdown here if it is a programming exercises, as ProgrammingExerciseInstructionComponent takes care of that
this.formattedProblemStatement = this.artemisMarkdown.safeHtmlForMarkdown(this.exercise.problemStatement);
}
this.isExamExercise = !!this.exercise.exerciseGroup;
this.exercise.isAtLeastTutor = this.accountService.isAtLeastTutorForExercise(this.exercise);
Expand Down

0 comments on commit 20e11ff

Please sign in to comment.