mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Feedback général à la question : formules KateX pas prises en charge dans l'affichage du quiz
Fixes #202
This commit is contained in:
parent
6f270b5436
commit
dfe8c36804
4 changed files with 8 additions and 8 deletions
|
|
@ -72,7 +72,7 @@ const MultipleChoiceQuestion: React.FC<Props> = (props) => {
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
{globalFeedback && showAnswer && (
|
{globalFeedback && showAnswer && (
|
||||||
<div className="global-feedback mb-2">{globalFeedback}</div>
|
<div className="global-feedback mb-2" dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(formatLatex(globalFeedback))}}></div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{!showAnswer && handleOnSubmitAnswer && (
|
{!showAnswer && handleOnSubmitAnswer && (
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import '../questionStyle.css';
|
import '../questionStyle.css';
|
||||||
import { Button, TextField } from '@mui/material';
|
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 { TextFormat } from '../../GiftTemplate/templates/types';
|
||||||
import DOMPurify from 'dompurify';
|
import DOMPurify from 'dompurify';
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ const NumericalQuestion: React.FC<Props> = (props) => {
|
||||||
{showAnswer ? (
|
{showAnswer ? (
|
||||||
<>
|
<>
|
||||||
<div className="correct-answer-text mb-2">{correctAnswer}</div>
|
<div className="correct-answer-text mb-2">{correctAnswer}</div>
|
||||||
{globalFeedback && <div className="global-feedback mb-2">{globalFeedback}</div>}
|
{globalFeedback && <div className="global-feedback mb-2" dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(formatLatex(globalFeedback))}}></div>}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|
@ -56,7 +56,7 @@ const NumericalQuestion: React.FC<Props> = (props) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{globalFeedback && showAnswer && (
|
{globalFeedback && showAnswer && (
|
||||||
<div className="global-feedback mb-2">{globalFeedback}</div>
|
<div className="global-feedback mb-2" dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(formatLatex(globalFeedback))}}></div>
|
||||||
)}
|
)}
|
||||||
{handleOnSubmitAnswer && (
|
{handleOnSubmitAnswer && (
|
||||||
<Button
|
<Button
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import '../questionStyle.css';
|
import '../questionStyle.css';
|
||||||
import { Button, TextField } from '@mui/material';
|
import { Button, TextField } from '@mui/material';
|
||||||
import textType from '../../GiftTemplate/templates/TextType';
|
|
||||||
import { TextFormat } from '../../GiftTemplate/templates/types';
|
import { TextFormat } from '../../GiftTemplate/templates/types';
|
||||||
|
import textType, { formatLatex } from '../../GiftTemplate/templates/TextType';
|
||||||
import DOMPurify from 'dompurify';
|
import DOMPurify from 'dompurify';
|
||||||
|
|
||||||
type Choices = {
|
type Choices = {
|
||||||
|
|
@ -40,7 +40,7 @@ const ShortAnswerQuestion: React.FC<Props> = (props) => {
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{globalFeedback && <div className="global-feedback mb-2">{globalFeedback}</div>}
|
{globalFeedback && <div className="global-feedback mb-2"dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(formatLatex(globalFeedback))}}></div>}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import '../questionStyle.css';
|
import '../questionStyle.css';
|
||||||
import { Button } from '@mui/material';
|
import { Button } from '@mui/material';
|
||||||
import textType from '../../GiftTemplate/templates/TextType';
|
|
||||||
import { TextFormat } from '../../GiftTemplate/templates/types';
|
import { TextFormat } from '../../GiftTemplate/templates/types';
|
||||||
|
import textType, { formatLatex } from '../../GiftTemplate/templates/TextType';
|
||||||
import DOMPurify from 'dompurify';
|
import DOMPurify from 'dompurify';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|
@ -51,7 +51,7 @@ const TrueFalseQuestion: React.FC<Props> = (props) => {
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
{globalFeedback && showAnswer && (
|
{globalFeedback && showAnswer && (
|
||||||
<div className="global-feedback mb-2">{globalFeedback}</div>
|
<div className="global-feedback mb-2" dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(formatLatex(globalFeedback))}}></div>
|
||||||
)}
|
)}
|
||||||
{!showAnswer && handleOnSubmitAnswer && (
|
{!showAnswer && handleOnSubmitAnswer && (
|
||||||
<Button
|
<Button
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue