From 063582ff9063bee76ea41cc294b6475ec8bc0efd Mon Sep 17 00:00:00 2001 From: Alex Lewin Date: Mon, 10 Nov 2025 16:22:37 +0000 Subject: [PATCH 1/2] No longer set blank current attempt on coord q load This was incorrectly setting the question status to "all attempted (some errors)" before any attempt had actually been made --- src/app/components/content/IsaacCoordinateQuestion.tsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/app/components/content/IsaacCoordinateQuestion.tsx b/src/app/components/content/IsaacCoordinateQuestion.tsx index 95f2217068..098a66ca41 100644 --- a/src/app/components/content/IsaacCoordinateQuestion.tsx +++ b/src/app/components/content/IsaacCoordinateQuestion.tsx @@ -121,12 +121,6 @@ const IsaacCoordinateQuestion = ({doc, questionId, readonly}: IsaacQuestionProps return {type: "coordinateItem", coordinates: Array(numberOfDimensions).fill("")}; }, [numberOfDimensions]); - useEffect(() => { - if (!isDefined(currentAttempt)) { - dispatchSetCurrentAttempt({type: "coordinateChoice", items: [getEmptyCoordItem()]}); - } - }, [dispatchSetCurrentAttempt, currentAttempt, getEmptyCoordItem]); - const updateItem = useCallback((index: number, value: Immutable) => { const items = [...(currentAttempt?.items ?? [])].map(item => isDefined(item) ? cleanItem(item) : getEmptyCoordItem()); items[index] = cleanItem(value); From 99a79e6a7f0d2630545e6133be386a62e61351a2 Mon Sep 17 00:00:00 2001 From: Alex Lewin Date: Mon, 10 Nov 2025 16:28:41 +0000 Subject: [PATCH 2/2] Remove unused import --- src/app/components/content/IsaacCoordinateQuestion.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/content/IsaacCoordinateQuestion.tsx b/src/app/components/content/IsaacCoordinateQuestion.tsx index 098a66ca41..d800d11745 100644 --- a/src/app/components/content/IsaacCoordinateQuestion.tsx +++ b/src/app/components/content/IsaacCoordinateQuestion.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useEffect} from "react"; +import React, {useCallback} from "react"; import {IsaacContentValueOrChildren} from "./IsaacContentValueOrChildren"; import {CoordinateChoiceDTO, CoordinateItemDTO, IsaacCoordinateQuestionDTO} from "../../../IsaacApiTypes"; import {Button, Input} from "reactstrap";