Updated the Level Exam to work based on Parts
This commit is contained in:
@@ -69,7 +69,7 @@ export const getExamById = async (module: Module, id: string): Promise<Exam | un
|
||||
};
|
||||
|
||||
export const defaultExamUserSolutions = (exam: Exam) => {
|
||||
if (exam.module === "reading" || exam.module === "listening")
|
||||
if (exam.module === "reading" || exam.module === "listening" || exam.module === "level")
|
||||
return exam.parts.flatMap((x) => x.exercises).map((x) => defaultUserSolutions(x, exam));
|
||||
|
||||
return exam.exercises.map((x) => defaultUserSolutions(x, exam));
|
||||
|
||||
Reference in New Issue
Block a user