diff --git a/src/components/play/multipleChoices/PlayMultipleChoices.tsx b/src/components/play/multipleChoices/PlayMultipleChoices.tsx index 6fe253ef..5a01c56c 100644 --- a/src/components/play/multipleChoices/PlayMultipleChoices.tsx +++ b/src/components/play/multipleChoices/PlayMultipleChoices.tsx @@ -111,12 +111,19 @@ const PlayMultipleChoices = ({ computeChoiceState(choice, lastUserAnswer?.choices, showCorrection) ); const showError = - choiceStates.some( - (state) => - state === ChoiceState.INCORRECT || state === ChoiceState.MISSING - ) && - showCorrectness && - !showCorrection; + (showCorrection && + choiceStates.some( + (state) => + state === ChoiceState.INCORRECT || state === ChoiceState.MISSING + )) || + (showCorrectness && !showCorrection); + + useEffect(() => { + console.log( + `showError: ${showError}, showCorrectness: ${showCorrectness}, showCorrection: ${showCorrection}`, + choiceStates + ); + }, [choiceStates, showCorrection, showCorrectness, showError]); useEffect(() => { const answers = choices.map((c, idx) => choiceToAnswer(c, idx));