Skip to content

Commit

Permalink
Exam mode: Fix the display of students after exam conduction (#7615)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximiliansoelch authored Nov 17, 2023
1 parent 5294e36 commit dbc2c6f
Showing 1 changed file with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,15 @@ export class ExamStudentsComponent implements OnInit, OnDestroy {
if (this.hasExamEnded) {
this.studentExamService.findAllForExam(this.courseId, exam.id!).subscribe((res) => {
const studentExams = res.body;
if (studentExams!.length > 0) {
this.allRegisteredUsers =
exam.examUsers?.map((examUser) => {
const studentExam = studentExams!.filter((studentExam) => studentExam.user?.id === examUser.user!.id).first();
return {
...examUser.user!,
...examUser,
didExamUserAttendExam: !!studentExam!.started,
};
}) || [];
}
this.allRegisteredUsers =
exam.examUsers?.map((examUser) => {
const studentExam = studentExams?.filter((studentExam) => studentExam.user?.id === examUser.user!.id).first();
return {
...examUser.user!,
...examUser,
didExamUserAttendExam: !!studentExam?.started,
};
}) || [];
});
} else {
this.allRegisteredUsers =
Expand Down

0 comments on commit dbc2c6f

Please sign in to comment.