Merge, do not push to develop yet, Listening.tsx is not updated
This commit is contained in:
@@ -222,7 +222,7 @@ export default function ExamPage({ page, user, destination = "/", hideSidebar =
|
||||
}, [saveStats, setFlags, setModuleIndex, evaluated, pendingExercises, setUserSolutions]);
|
||||
|
||||
|
||||
const aggregateScoresByModule = (): {
|
||||
const aggregateScoresByModule = (isPractice?: boolean): {
|
||||
module: Module;
|
||||
total: number;
|
||||
missing: number;
|
||||
@@ -258,7 +258,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);
|
||||
|
||||
@@ -360,6 +360,7 @@ export default function ExamPage({ page, user, destination = "/", hideSidebar =
|
||||
setPartIndex(0);
|
||||
}}
|
||||
scores={aggregateScoresByModule()}
|
||||
practiceScores={aggregateScoresByModule(true)}
|
||||
/>}
|
||||
{/* Exam is on going, display it and the abandon modal */}
|
||||
{isExamLoaded && moduleIndex !== -1 && (
|
||||
|
||||
Reference in New Issue
Block a user