Merge, do not push to develop yet, Listening.tsx is not updated

This commit is contained in:
Carlos-Mesquita
2024-11-26 10:33:02 +00:00
44 changed files with 1989 additions and 1452 deletions

View File

@@ -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 && (