Updated the Level Exam to work based on Parts

This commit is contained in:
Tiago Ribeiro
2024-06-07 13:25:18 +01:00
parent 8ea97ee944
commit daec246835
15 changed files with 176 additions and 121 deletions

View File

@@ -72,7 +72,7 @@ export default function ExamList({user}: {user: User}) {
};
const getTotalExercises = (exam: Exam) => {
if (exam.module === "reading" || exam.module === "listening") {
if (exam.module === "reading" || exam.module === "listening" || exam.module === "level") {
return countExercises(exam.parts.flatMap((x) => x.exercises));
}