Skip to content

Commit

Permalink
Fix getReviewProgress
Browse files Browse the repository at this point in the history
  • Loading branch information
VirmasaloA committed Jul 1, 2024
1 parent 37a1163 commit 56d6c19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/src/app/review/assessment/sections/section.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ export class ExamSectionComponent implements OnInit, AfterViewInit {
this.essayQuestionAmounts = this.Question.getEssayQuestionAmountsBySection(this.section);
};

// getReviewProgress gathers the questions that have been reviewed by calculating essay answers that have been evaluated plus the rest of the questions.
// Since the essay questions are the only ones that need to be evaluated and the rest of the questions are evaluated automatically.
getReviewProgress = () => {
return this.section.sectionQuestions.filter((q: ExamSectionQuestion) => {
return q.forcedScore || q.essayAnswer?.evaluatedScore;
return q.question.type !== 'EssayQuestion' || q.essayAnswer?.evaluatedScore;
}).length;
};

Expand Down

0 comments on commit 56d6c19

Please sign in to comment.