Updated the writing exam to work based on exercises instead of just a single one
This commit is contained in:
@@ -99,9 +99,9 @@ export default function Reading({exam, showSolutions = false, onFinish}: Props)
|
||||
}
|
||||
|
||||
if (solution) {
|
||||
onFinish([...userSolutions.filter((x) => x.id !== solution.id), solution].map((x) => ({...x, module: "reading"})));
|
||||
onFinish([...userSolutions.filter((x) => x.id !== solution.id), solution].map((x) => ({...x, module: "reading", exam: exam.id})));
|
||||
} else {
|
||||
onFinish(userSolutions.map((x) => ({...x, module: "reading"})));
|
||||
onFinish(userSolutions.map((x) => ({...x, module: "reading", exam: exam.id})));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user