diff --git a/client/src/components/Questions/MultipleChoiceQuestion/MultipleChoiceQuestion.tsx b/client/src/components/Questions/MultipleChoiceQuestion/MultipleChoiceQuestion.tsx index 9c18605..289a7d5 100644 --- a/client/src/components/Questions/MultipleChoiceQuestion/MultipleChoiceQuestion.tsx +++ b/client/src/components/Questions/MultipleChoiceQuestion/MultipleChoiceQuestion.tsx @@ -72,7 +72,7 @@ const MultipleChoiceQuestion: React.FC = (props) => { })} {globalFeedback && showAnswer && ( -
{globalFeedback}
+
)} {!showAnswer && handleOnSubmitAnswer && ( diff --git a/client/src/components/Questions/NumericalQuestion/NumericalQuestion.tsx b/client/src/components/Questions/NumericalQuestion/NumericalQuestion.tsx index 7a9cec7..444a794 100644 --- a/client/src/components/Questions/NumericalQuestion/NumericalQuestion.tsx +++ b/client/src/components/Questions/NumericalQuestion/NumericalQuestion.tsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import '../questionStyle.css'; import { Button, TextField } from '@mui/material'; -import textType from '../../GiftTemplate/templates/TextType'; +import textType, { formatLatex } from '../../GiftTemplate/templates/TextType'; import { TextFormat } from '../../GiftTemplate/templates/types'; import DOMPurify from 'dompurify'; @@ -40,7 +40,7 @@ const NumericalQuestion: React.FC = (props) => { {showAnswer ? ( <>
{correctAnswer}
- {globalFeedback &&
{globalFeedback}
} + {globalFeedback &&
} ) : ( <> @@ -56,7 +56,7 @@ const NumericalQuestion: React.FC = (props) => { /> {globalFeedback && showAnswer && ( -
{globalFeedback}
+
)} {handleOnSubmitAnswer && ( {globalFeedback && showAnswer && ( -
{globalFeedback}
+
)} {!showAnswer && handleOnSubmitAnswer && (