Some light bug solving

This commit is contained in:
Tiago Ribeiro
2023-08-11 23:54:09 +01:00
parent db54d58bab
commit d9ca0e84a6
3 changed files with 13 additions and 11 deletions

View File

@@ -57,6 +57,7 @@ export default function Speaking({id, title, text, type, prompts, onNext, onBack
))} ))}
</span> </span>
</div> </div>
{prompts && prompts.length > 0 && (
<div className="flex flex-col gap-4"> <div className="flex flex-col gap-4">
<span className="font-bold">You should talk about the following things:</span> <span className="font-bold">You should talk about the following things:</span>
<div className="flex flex-col gap-1 ml-4"> <div className="flex flex-col gap-1 ml-4">
@@ -67,6 +68,7 @@ export default function Speaking({id, title, text, type, prompts, onNext, onBack
))} ))}
</div> </div>
</div> </div>
)}
</div> </div>
<ReactMediaRecorder <ReactMediaRecorder

View File

@@ -52,7 +52,7 @@ export default function Listening({exam, showSolutions = false, onFinish}: Props
return; return;
} }
if (!userSolutions.map((x) => x.score.missing).every((x) => x === 0) && !showSolutions && !hasExamEnded) { if (![...userSolutions.map((x) => x.score.missing), solution?.score.missing].every((x) => x === 0) && !showSolutions && !hasExamEnded) {
setShowBlankModal(true); setShowBlankModal(true);
return; return;
} }

View File

@@ -112,7 +112,7 @@ export default function Reading({exam, showSolutions = false, onFinish}: Props)
return; return;
} }
if (!userSolutions.map((x) => x.score.missing).every((x) => x === 0) && !showSolutions && !hasExamEnded) { if (![...userSolutions.map((x) => x.score.missing), solution?.score.missing].every((x) => x === 0) && !showSolutions && !hasExamEnded) {
setShowBlankModal(true); setShowBlankModal(true);
return; return;
} }