mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Compare commits
1 commit
03faf97702
...
68e90bdbdc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68e90bdbdc |
2 changed files with 64 additions and 136 deletions
|
|
@ -75,36 +75,36 @@ describe('ManageRoom', () => {
|
||||||
</MemoryRouter>
|
</MemoryRouter>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
const createSuccessCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'create-success')[1];
|
const createSuccessCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'create-success')[1];
|
||||||
createSuccessCallback('Test Room');
|
createSuccessCallback('Test Room');
|
||||||
});
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(ApiService.getQuiz).toHaveBeenCalledWith('test-quiz-id');
|
expect(ApiService.getQuiz).toHaveBeenCalledWith('test-quiz-id');
|
||||||
});
|
});
|
||||||
|
|
||||||
const launchButton = screen.getByText('Lancer');
|
const launchButton = screen.getByText('Lancer');
|
||||||
fireEvent.click(launchButton);
|
fireEvent.click(launchButton);
|
||||||
|
|
||||||
const rythmeButton = screen.getByText('Rythme du professeur');
|
const rythmeButton = screen.getByText('Rythme du professeur');
|
||||||
fireEvent.click(rythmeButton);
|
fireEvent.click(rythmeButton);
|
||||||
|
|
||||||
const secondLaunchButton = screen.getAllByText('Lancer');
|
const secondLaunchButton = screen.getAllByText('Lancer');
|
||||||
fireEvent.click(secondLaunchButton[1]);
|
fireEvent.click(secondLaunchButton[1]);
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(screen.getByText('Test Quiz')).toBeInTheDocument();
|
expect(screen.getByText('Test Quiz')).toBeInTheDocument();
|
||||||
|
|
||||||
const roomHeader = document.querySelector('h1');
|
const roomHeader = document.querySelector('h1');
|
||||||
expect(roomHeader).toHaveTextContent('Salle : TEST ROOM');
|
expect(roomHeader).toHaveTextContent('Salle : TEST ROOM');
|
||||||
|
|
||||||
expect(screen.getByText('0/60')).toBeInTheDocument();
|
expect(screen.getByText('0/60')).toBeInTheDocument();
|
||||||
expect(screen.getByText('Question 1/2')).toBeInTheDocument();
|
expect(screen.getByText('Question 1/2')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('handles create-success event', async () => {
|
test('handles create-success event', async () => {
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
render(
|
render(
|
||||||
|
|
@ -171,30 +171,30 @@ describe('ManageRoom', () => {
|
||||||
</MemoryRouter>
|
</MemoryRouter>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
const createSuccessCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'create-success')[1];
|
const createSuccessCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'create-success')[1];
|
||||||
createSuccessCallback('Test Room');
|
createSuccessCallback('Test Room');
|
||||||
});
|
});
|
||||||
|
|
||||||
fireEvent.click(screen.getByText('Lancer'));
|
fireEvent.click(screen.getByText('Lancer'));
|
||||||
fireEvent.click(screen.getByText('Rythme du professeur'));
|
fireEvent.click(screen.getByText('Rythme du professeur'));
|
||||||
fireEvent.click(screen.getAllByText('Lancer')[1]);
|
fireEvent.click(screen.getAllByText('Lancer')[1]);
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
screen.debug();
|
screen.debug();
|
||||||
});
|
});
|
||||||
|
|
||||||
const nextQuestionButton = await screen.findByRole('button', { name: /Prochaine question/i });
|
const nextQuestionButton = await screen.findByRole('button', { name: /Prochaine question/i });
|
||||||
expect(nextQuestionButton).toBeInTheDocument();
|
expect(nextQuestionButton).toBeInTheDocument();
|
||||||
|
|
||||||
fireEvent.click(nextQuestionButton);
|
fireEvent.click(nextQuestionButton);
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(screen.getByText('Question 2/2')).toBeInTheDocument();
|
expect(screen.getByText('Question 2/2')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('handles disconnect', async () => {
|
test('handles disconnect', async () => {
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
render(
|
render(
|
||||||
|
|
@ -230,38 +230,38 @@ describe('ManageRoom', () => {
|
||||||
</MemoryRouter>
|
</MemoryRouter>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
const createSuccessCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'create-success')[1];
|
const createSuccessCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'create-success')[1];
|
||||||
createSuccessCallback('Test Room');
|
createSuccessCallback('Test Room');
|
||||||
});
|
});
|
||||||
|
|
||||||
const launchButton = screen.getByText('Lancer');
|
const launchButton = screen.getByText('Lancer');
|
||||||
fireEvent.click(launchButton);
|
fireEvent.click(launchButton);
|
||||||
|
|
||||||
const rythmeButton = screen.getByText('Rythme du professeur');
|
const rythmeButton = screen.getByText('Rythme du professeur');
|
||||||
fireEvent.click(rythmeButton);
|
fireEvent.click(rythmeButton);
|
||||||
|
|
||||||
const secondLaunchButton = screen.getAllByText('Lancer');
|
const secondLaunchButton = screen.getAllByText('Lancer');
|
||||||
fireEvent.click(secondLaunchButton[1]);
|
fireEvent.click(secondLaunchButton[1]);
|
||||||
|
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
const userJoinedCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'user-joined')[1];
|
const userJoinedCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'user-joined')[1];
|
||||||
userJoinedCallback(mockStudents[0]);
|
userJoinedCallback(mockStudents[0]);
|
||||||
});
|
});
|
||||||
|
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
const submitAnswerCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'submit-answer-room')[1];
|
const submitAnswerCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'submit-answer-room')[1];
|
||||||
submitAnswerCallback(mockAnswerData);
|
submitAnswerCallback(mockAnswerData);
|
||||||
});
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
// console.info(consoleSpy.mock.calls);
|
// console.info(consoleSpy.mock.calls);
|
||||||
expect(consoleSpy).toHaveBeenCalledWith(
|
expect(consoleSpy).toHaveBeenCalledWith(
|
||||||
'Received answer from Student 1 for question 1: Answer1'
|
'Received answer from Student 1 for question 1: Answer1'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
consoleSpy.mockRestore();
|
consoleSpy.mockRestore();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -294,75 +294,5 @@ describe('ManageRoom', () => {
|
||||||
expect(screen.queryByText('Student 1')).not.toBeInTheDocument();
|
expect(screen.queryByText('Student 1')).not.toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('handles user joined and leaves but name still seeable', async () => {
|
|
||||||
await act(async () => {
|
|
||||||
render(
|
|
||||||
<MemoryRouter>
|
|
||||||
<ManageRoom />
|
|
||||||
</MemoryRouter>
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
await act(async () => {
|
|
||||||
const createSuccessCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'create-success')[1];
|
|
||||||
createSuccessCallback('Test Room');
|
|
||||||
});
|
|
||||||
|
|
||||||
await act(async () => {
|
|
||||||
const userJoinedCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'user-joined')[1];
|
|
||||||
userJoinedCallback(mockStudents[0]);
|
|
||||||
});
|
|
||||||
await act(async () => {
|
|
||||||
const userJoinedCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'user-joined')[1];
|
|
||||||
userJoinedCallback(mockStudents[1]);
|
|
||||||
});
|
|
||||||
|
|
||||||
await waitFor(() => {
|
|
||||||
expect(screen.getByText('Student 1')).toBeInTheDocument();
|
|
||||||
|
|
||||||
});
|
|
||||||
await waitFor(() => {
|
|
||||||
expect(screen.getByText('Student 2')).toBeInTheDocument();
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
const launchButton = screen.getByText('Lancer');
|
|
||||||
fireEvent.click(launchButton);
|
|
||||||
|
|
||||||
const rythmeButton = screen.getByText('Rythme du professeur');
|
|
||||||
fireEvent.click(rythmeButton);
|
|
||||||
|
|
||||||
const secondLaunchButton = screen.getAllByText('Lancer');
|
|
||||||
fireEvent.click(secondLaunchButton[1]);
|
|
||||||
|
|
||||||
await waitFor(() => {
|
|
||||||
expect(screen.getByText('2/60')).toBeInTheDocument();
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
await act(async () => {
|
|
||||||
const userDisconnectedCallback = (mockSocket.on as jest.Mock).mock.calls.find(call => call[0] === 'user-disconnected')[1];
|
|
||||||
userDisconnectedCallback(mockStudents[1].id);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
await waitFor(() => {
|
|
||||||
expect(screen.getByText('Résultats du quiz')).toBeInTheDocument();
|
|
||||||
|
|
||||||
});
|
|
||||||
const toggleUsernamesSwitch = screen.getByLabelText('Afficher les noms');
|
|
||||||
|
|
||||||
// Toggle the display of usernames back
|
|
||||||
fireEvent.click(toggleUsernamesSwitch);
|
|
||||||
|
|
||||||
expect(screen.getByText('Student 1')).toBeInTheDocument();
|
|
||||||
|
|
||||||
expect(screen.getByText('Student 2')).toBeInTheDocument();
|
|
||||||
|
|
||||||
await waitFor(() => {
|
|
||||||
expect(screen.getByText('1/60')).toBeInTheDocument();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,9 @@ import { checkIfIsCorrect } from './useRooms';
|
||||||
const ManageRoom: React.FC = () => {
|
const ManageRoom: React.FC = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [socket, setSocket] = useState<Socket | null>(null);
|
const [socket, setSocket] = useState<Socket | null>(null);
|
||||||
const [connectedStudents, setConnectedStudents] = useState<StudentType[]>([]);
|
const [students, setStudents] = useState<StudentType[]>([]);
|
||||||
const [totalStudents, setTotalStudents] = useState<StudentType[]>([]);
|
const [allStudents, setAllStudents] = useState<StudentType[]>([]);
|
||||||
const { quizId = '', roomName = '' } = useParams<{ quizId: string, roomName: string }>();
|
const { quizId = '', roomName = '' } = useParams<{ quizId: string, roomName: string }>();
|
||||||
const [quizQuestions, setQuizQuestions] = useState<QuestionType[] | undefined>();
|
const [quizQuestions, setQuizQuestions] = useState<QuestionType[] | undefined>();
|
||||||
const [quiz, setQuiz] = useState<QuizType | null>(null);
|
const [quiz, setQuiz] = useState<QuizType | null>(null);
|
||||||
const [quizMode, setQuizMode] = useState<'teacher' | 'student'>('teacher');
|
const [quizMode, setQuizMode] = useState<'teacher' | 'student'>('teacher');
|
||||||
|
|
@ -41,15 +41,15 @@ const ManageRoom: React.FC = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (newlyConnectedUser) {
|
if (newlyConnectedUser) {
|
||||||
console.log(`Handling newly connected user: ${newlyConnectedUser.name}`);
|
console.log(`Handling newly connected user: ${newlyConnectedUser.name}`);
|
||||||
setConnectedStudents((prevStudents) => [...prevStudents, newlyConnectedUser]);
|
setStudents((prevStudents) => [...prevStudents, newlyConnectedUser]);
|
||||||
setTotalStudents((prevStudents) => [...prevStudents, newlyConnectedUser]);
|
setAllStudents((prevStudents) => [...prevStudents, newlyConnectedUser]);
|
||||||
|
|
||||||
// only send nextQuestion if the quiz has started
|
// only send nextQuestion if the quiz has started
|
||||||
if (!quizStarted) {
|
if (!quizStarted) {
|
||||||
console.log(`!quizStarted: returning.... `);
|
console.log(`!quizStarted: returning.... `);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quizMode === 'teacher') {
|
if (quizMode === 'teacher') {
|
||||||
webSocketService.nextQuestion({
|
webSocketService.nextQuestion({
|
||||||
roomName: formattedRoomName,
|
roomName: formattedRoomName,
|
||||||
|
|
@ -62,7 +62,7 @@ const ManageRoom: React.FC = () => {
|
||||||
} else {
|
} else {
|
||||||
console.error('Invalid quiz mode:', quizMode);
|
console.error('Invalid quiz mode:', quizMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset the newly connected user state
|
// Reset the newly connected user state
|
||||||
setNewlyConnectedUser(null);
|
setNewlyConnectedUser(null);
|
||||||
}
|
}
|
||||||
|
|
@ -93,7 +93,7 @@ const ManageRoom: React.FC = () => {
|
||||||
return () => {
|
return () => {
|
||||||
disconnectWebSocket();
|
disconnectWebSocket();
|
||||||
};
|
};
|
||||||
}, [roomName, navigate]);
|
}, [roomName, navigate]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (quizId) {
|
if (quizId) {
|
||||||
|
|
@ -130,8 +130,8 @@ const ManageRoom: React.FC = () => {
|
||||||
setSocket(null);
|
setSocket(null);
|
||||||
setQuizQuestions(undefined);
|
setQuizQuestions(undefined);
|
||||||
setCurrentQuestion(undefined);
|
setCurrentQuestion(undefined);
|
||||||
setConnectedStudents(new Array<StudentType>());
|
setStudents(new Array<StudentType>());
|
||||||
setTotalStudents(new Array<StudentType>());
|
setAllStudents(new Array<StudentType>());
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -176,7 +176,7 @@ const ManageRoom: React.FC = () => {
|
||||||
|
|
||||||
socket.on('user-disconnected', (userId: string) => {
|
socket.on('user-disconnected', (userId: string) => {
|
||||||
console.log(`Student left: id = ${userId}`);
|
console.log(`Student left: id = ${userId}`);
|
||||||
setConnectedStudents((prevUsers) => prevUsers.filter((user) => user.id !== userId));
|
setStudents((prevUsers) => prevUsers.filter((user) => user.id !== userId));
|
||||||
});
|
});
|
||||||
|
|
||||||
setSocket(socket);
|
setSocket(socket);
|
||||||
|
|
@ -197,7 +197,7 @@ const ManageRoom: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the students state using the functional form of setStudents
|
// Update the students state using the functional form of setStudents
|
||||||
setConnectedStudents((prevStudents) => {
|
setStudents((prevStudents) => {
|
||||||
console.log('Current students:');
|
console.log('Current students:');
|
||||||
prevStudents.forEach((student) => {
|
prevStudents.forEach((student) => {
|
||||||
console.log(student.name);
|
console.log(student.name);
|
||||||
|
|
@ -217,14 +217,14 @@ const ManageRoom: React.FC = () => {
|
||||||
console.log(`Comparing ${ans.idQuestion} to ${idQuestion}`);
|
console.log(`Comparing ${ans.idQuestion} to ${idQuestion}`);
|
||||||
return ans.idQuestion === idQuestion
|
return ans.idQuestion === idQuestion
|
||||||
? {
|
? {
|
||||||
...ans,
|
...ans,
|
||||||
answer,
|
answer,
|
||||||
isCorrect: checkIfIsCorrect(
|
isCorrect: checkIfIsCorrect(
|
||||||
answer,
|
answer,
|
||||||
idQuestion,
|
idQuestion,
|
||||||
quizQuestions!
|
quizQuestions!
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
: ans;
|
: ans;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -244,7 +244,7 @@ const ManageRoom: React.FC = () => {
|
||||||
}
|
}
|
||||||
return updatedStudents;
|
return updatedStudents;
|
||||||
});
|
});
|
||||||
setTotalStudents((prevStudents) => {
|
setAllStudents((prevStudents) => {
|
||||||
let foundStudent = false;
|
let foundStudent = false;
|
||||||
const updatedStudents = prevStudents.map((student) => {
|
const updatedStudents = prevStudents.map((student) => {
|
||||||
console.log(`Comparing ${student.id} to ${idUser}`);
|
console.log(`Comparing ${student.id} to ${idUser}`);
|
||||||
|
|
@ -259,14 +259,14 @@ const ManageRoom: React.FC = () => {
|
||||||
console.log(`Comparing ${ans.idQuestion} to ${idQuestion}`);
|
console.log(`Comparing ${ans.idQuestion} to ${idQuestion}`);
|
||||||
return ans.idQuestion === idQuestion
|
return ans.idQuestion === idQuestion
|
||||||
? {
|
? {
|
||||||
...ans,
|
...ans,
|
||||||
answer,
|
answer,
|
||||||
isCorrect: checkIfIsCorrect(
|
isCorrect: checkIfIsCorrect(
|
||||||
answer,
|
answer,
|
||||||
idQuestion,
|
idQuestion,
|
||||||
quizQuestions!
|
quizQuestions!
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
: ans;
|
: ans;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -299,12 +299,10 @@ const ManageRoom: React.FC = () => {
|
||||||
if (nextQuestionIndex === undefined || nextQuestionIndex > quizQuestions.length - 1) return;
|
if (nextQuestionIndex === undefined || nextQuestionIndex > quizQuestions.length - 1) return;
|
||||||
|
|
||||||
setCurrentQuestion(quizQuestions[nextQuestionIndex]);
|
setCurrentQuestion(quizQuestions[nextQuestionIndex]);
|
||||||
webSocketService.nextQuestion({
|
webSocketService.nextQuestion({roomName: formattedRoomName,
|
||||||
roomName: formattedRoomName,
|
questions: quizQuestions,
|
||||||
questions: quizQuestions,
|
questionIndex: nextQuestionIndex,
|
||||||
questionIndex: nextQuestionIndex,
|
isLaunch: false});
|
||||||
isLaunch: false
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const previousQuestion = () => {
|
const previousQuestion = () => {
|
||||||
|
|
@ -314,7 +312,7 @@ const ManageRoom: React.FC = () => {
|
||||||
|
|
||||||
if (prevQuestionIndex === undefined || prevQuestionIndex < 0) return;
|
if (prevQuestionIndex === undefined || prevQuestionIndex < 0) return;
|
||||||
setCurrentQuestion(quizQuestions[prevQuestionIndex]);
|
setCurrentQuestion(quizQuestions[prevQuestionIndex]);
|
||||||
webSocketService.nextQuestion({ roomName: formattedRoomName, questions: quizQuestions, questionIndex: prevQuestionIndex, isLaunch: false });
|
webSocketService.nextQuestion({roomName: formattedRoomName, questions: quizQuestions, questionIndex: prevQuestionIndex, isLaunch: false});
|
||||||
};
|
};
|
||||||
|
|
||||||
const initializeQuizQuestion = () => {
|
const initializeQuizQuestion = () => {
|
||||||
|
|
@ -342,7 +340,7 @@ const ManageRoom: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
setCurrentQuestion(quizQuestions[0]);
|
setCurrentQuestion(quizQuestions[0]);
|
||||||
webSocketService.nextQuestion({ roomName: formattedRoomName, questions: quizQuestions, questionIndex: 0, isLaunch: true });
|
webSocketService.nextQuestion({roomName: formattedRoomName, questions: quizQuestions, questionIndex: 0, isLaunch: true});
|
||||||
};
|
};
|
||||||
|
|
||||||
const launchStudentMode = () => {
|
const launchStudentMode = () => {
|
||||||
|
|
@ -379,7 +377,7 @@ const ManageRoom: React.FC = () => {
|
||||||
if (quiz?.content && quizQuestions) {
|
if (quiz?.content && quizQuestions) {
|
||||||
setCurrentQuestion(quizQuestions[questionIndex]);
|
setCurrentQuestion(quizQuestions[questionIndex]);
|
||||||
if (quizMode === 'teacher') {
|
if (quizMode === 'teacher') {
|
||||||
webSocketService.nextQuestion({ roomName: formattedRoomName, questions: quizQuestions, questionIndex, isLaunch: false });
|
webSocketService.nextQuestion({roomName: formattedRoomName, questions: quizQuestions, questionIndex, isLaunch: false});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -436,7 +434,7 @@ const ManageRoom: React.FC = () => {
|
||||||
style={{ display: "flex", justifyContent: "flex-end" }}
|
style={{ display: "flex", justifyContent: "flex-end" }}
|
||||||
>
|
>
|
||||||
<GroupIcon style={{ marginRight: '5px' }} />
|
<GroupIcon style={{ marginRight: '5px' }} />
|
||||||
{connectedStudents.length}/60
|
{students.length}/60
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -473,7 +471,7 @@ const ManageRoom: React.FC = () => {
|
||||||
<QuestionDisplay
|
<QuestionDisplay
|
||||||
showAnswer={false}
|
showAnswer={false}
|
||||||
question={currentQuestion?.question as Question}
|
question={currentQuestion?.question as Question}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -482,7 +480,7 @@ const ManageRoom: React.FC = () => {
|
||||||
socket={socket}
|
socket={socket}
|
||||||
questions={quizQuestions}
|
questions={quizQuestions}
|
||||||
showSelectedQuestion={showSelectedQuestion}
|
showSelectedQuestion={showSelectedQuestion}
|
||||||
students={totalStudents}
|
students={allStudents}
|
||||||
></LiveResultsComponent>
|
></LiveResultsComponent>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -518,7 +516,7 @@ const ManageRoom: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<StudentWaitPage
|
<StudentWaitPage
|
||||||
students={connectedStudents}
|
students={students}
|
||||||
launchQuiz={launchQuiz}
|
launchQuiz={launchQuiz}
|
||||||
setQuizMode={setQuizMode}
|
setQuizMode={setQuizMode}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue