Made it so when the timer ends, the module ends
This commit is contained in:
@@ -201,6 +201,11 @@ export default function Page() {
|
||||
|
||||
const onFinish = (solutions: UserSolution[]) => {
|
||||
const solutionIds = solutions.map((x) => x.exercise);
|
||||
const solutionExams = solutions.map((x) => x.exam);
|
||||
|
||||
console.log(solutionExams, exam?.id, moduleIndex, selectedModules);
|
||||
|
||||
if (exam && !solutionExams.includes(exam.id)) return;
|
||||
|
||||
if (exam && (exam.module === "writing" || exam.module === "speaking") && solutions.length > 0 && !showSolutions) {
|
||||
setHasBeenUploaded(true);
|
||||
|
||||
Reference in New Issue
Block a user