fix: Re-shuffle options when retaking a quiz from the results screen
All checks were successful
Automated Container Build / build-and-push (push) Successful in 51s

This commit is contained in:
Elijah 2026-06-28 08:34:30 -07:00
parent b7165aba44
commit c34da6941e

View file

@ -250,6 +250,13 @@ export function QuizViewer({ quiz, retakeIds, isShared = false, onFinished }: Qu
setAnswers({});
setSubmittedAnswers([]);
setResultsData(null);
// Re-shuffle options for the new attempt
const newShuffledOpts: Record<string, Option[]> = {};
for (const q of quiz.questions) {
newShuffledOpts[q.id] = [...q.options].sort(() => Math.random() - 0.5);
}
setShuffledOptions(newShuffledOpts);
}}
onClose={onFinished}
/>