Updated the Finish screen to also show the practice score
This commit is contained in:
@@ -380,7 +380,7 @@ export default function ExamPage({ page, user, destination = "/", hideSidebar =
|
||||
setQuestionIndex(0);
|
||||
};
|
||||
|
||||
const aggregateScoresByModule = (): {
|
||||
const aggregateScoresByModule = (isPractice?: boolean): {
|
||||
module: Module;
|
||||
total: number;
|
||||
missing: number;
|
||||
@@ -416,7 +416,7 @@ export default function ExamPage({ page, user, destination = "/", hideSidebar =
|
||||
},
|
||||
};
|
||||
|
||||
userSolutions.filter(x => !x.isPractice).forEach((x) => {
|
||||
userSolutions.filter(x => isPractice ? x.isPractice : !x.isPractice).forEach((x) => {
|
||||
const examModule =
|
||||
x.module || (x.type === "writing" ? "writing" : x.type === "speaking" || x.type === "interactiveSpeaking" ? "speaking" : undefined);
|
||||
|
||||
@@ -483,6 +483,7 @@ export default function ExamPage({ page, user, destination = "/", hideSidebar =
|
||||
setExam(exams[0]);
|
||||
}}
|
||||
scores={aggregateScoresByModule()}
|
||||
practiceScores={aggregateScoresByModule(true)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user