From 70b788fbd08bfd4f31105f9a2738b165fd99ae2f Mon Sep 17 00:00:00 2001 From: JubaAzul <118773284+JubaAzul@users.noreply.github.com> Date: Fri, 7 Mar 2025 12:42:56 -0500 Subject: [PATCH] =?UTF-8?q?R=C3=A9ponse=20=C3=A0=20une=20question=20non=20?= =?UTF-8?q?enregistr=C3=A9e=20lorsque=20=C3=89tudiant=20reviens=20en=20arr?= =?UTF-8?q?i=C3=A8re=20dans=20le=20quiz=20Fixes=20#200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShortAnswerQuestionDisplay.tsx | 6 ++++-- client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/components/QuestionsDisplay/ShortAnswerQuestionDisplay/ShortAnswerQuestionDisplay.tsx b/client/src/components/QuestionsDisplay/ShortAnswerQuestionDisplay/ShortAnswerQuestionDisplay.tsx index f415679..1dc02b5 100644 --- a/client/src/components/QuestionsDisplay/ShortAnswerQuestionDisplay/ShortAnswerQuestionDisplay.tsx +++ b/client/src/components/QuestionsDisplay/ShortAnswerQuestionDisplay/ShortAnswerQuestionDisplay.tsx @@ -13,15 +13,17 @@ interface Props { } const ShortAnswerQuestionDisplay: React.FC = (props) => { + const { question, showAnswer, handleOnSubmitAnswer, passedAnswer } = props; - const [answer, setAnswer] = useState(passedAnswer || ' '); + const [answer, setAnswer] = useState(passedAnswer || ''); useEffect(() => { if (passedAnswer !== undefined) { setAnswer(passedAnswer); } }, [passedAnswer]); - + console.log("Answer" , answer); + return (
diff --git a/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx b/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx index 73b4530..db4e793 100644 --- a/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx +++ b/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx @@ -22,8 +22,6 @@ const TeacherModeQuiz: React.FC = ({ const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = useState(false); const [answer, setAnswer] = useState(''); - console.log("Answer" , answer); - useEffect(() => { // Close the feedback dialog when the question changes