mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
[BUG] Dans un quiz au rythme de l'étudiant, l'enseignant ne peut plus masquer les questions
Fixes #295
This commit is contained in:
parent
e4ae70896a
commit
206895ebb5
1 changed files with 15 additions and 10 deletions
|
|
@ -23,7 +23,7 @@ import DisconnectButton from 'src/components/DisconnectButton/DisconnectButton';
|
||||||
import QuestionDisplay from 'src/components/QuestionsDisplay/QuestionDisplay';
|
import QuestionDisplay from 'src/components/QuestionsDisplay/QuestionDisplay';
|
||||||
import ApiService from '../../../services/ApiService';
|
import ApiService from '../../../services/ApiService';
|
||||||
import { QuestionType } from 'src/Types/QuestionType';
|
import { QuestionType } from 'src/Types/QuestionType';
|
||||||
import { Button } from '@mui/material';
|
import { Button, FormControlLabel, Switch } from '@mui/material';
|
||||||
import { AnswerType } from 'src/pages/Student/JoinRoom/JoinRoom';
|
import { AnswerType } from 'src/pages/Student/JoinRoom/JoinRoom';
|
||||||
|
|
||||||
const ManageRoom: React.FC = () => {
|
const ManageRoom: React.FC = () => {
|
||||||
|
|
@ -471,19 +471,24 @@ const ManageRoom: React.FC = () => {
|
||||||
<div className="">
|
<div className="">
|
||||||
|
|
||||||
{quizQuestions ? (
|
{quizQuestions ? (
|
||||||
|
|
||||||
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
||||||
<div className="title center-h-align mb-2">{quiz?.title}</div>
|
<div className="title center-h-align mb-2">{quiz?.title}</div>
|
||||||
{(quizMode === 'student' && isQuestionShown) && (
|
|
||||||
<div className='close-button-wrapper'>
|
<div className='close-button-wrapper'>
|
||||||
<Button
|
<FormControlLabel
|
||||||
className="close-button"
|
label={<div className="text-sm">Afficher les questions</div>}
|
||||||
onClick={() => {
|
control={
|
||||||
setIsQuestionShown(false);
|
<Switch
|
||||||
}} >
|
value={isQuestionShown}
|
||||||
✖
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
|
||||||
</Button>
|
setIsQuestionShown(e.target.checked)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
{!isNaN(Number(currentQuestion?.question.id))
|
{!isNaN(Number(currentQuestion?.question.id))
|
||||||
&& isQuestionShown && (
|
&& isQuestionShown && (
|
||||||
<strong className="number of questions">
|
<strong className="number of questions">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue