mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Réponse à une question non enregistrée lorsque Étudiant reviens en arrière dans le quiz
Fixes #200
This commit is contained in:
parent
6a340556e2
commit
70b788fbd0
2 changed files with 4 additions and 4 deletions
|
|
@ -13,14 +13,16 @@ interface Props {
|
|||
}
|
||||
|
||||
const ShortAnswerQuestionDisplay: React.FC<Props> = (props) => {
|
||||
|
||||
const { question, showAnswer, handleOnSubmitAnswer, passedAnswer } = props;
|
||||
const [answer, setAnswer] = useState<string | number | boolean>(passedAnswer || ' ');
|
||||
const [answer, setAnswer] = useState<string | number | boolean>(passedAnswer || '');
|
||||
|
||||
useEffect(() => {
|
||||
if (passedAnswer !== undefined) {
|
||||
setAnswer(passedAnswer);
|
||||
}
|
||||
}, [passedAnswer]);
|
||||
console.log("Answer" , answer);
|
||||
|
||||
return (
|
||||
<div className="question-wrapper">
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@ const TeacherModeQuiz: React.FC<TeacherModeQuizProps> = ({
|
|||
const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = useState(false);
|
||||
const [answer, setAnswer] = useState<string | number | boolean>('');
|
||||
|
||||
console.log("Answer" , answer);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
// Close the feedback dialog when the question changes
|
||||
|
|
|
|||
Loading…
Reference in a new issue