Skip to content

Commit

Permalink
fix (UI) [QCMPLUS-38] -update Header
Browse files Browse the repository at this point in the history
Signed-off-by: Teclit <[email protected]>
  • Loading branch information
Teclit committed Aug 22, 2024
1 parent 5de6dd7 commit d6d4fd8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion qcmplusweb/src/components/Exam/Exam.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


.exam-results-list {
max-height: 600px;
max-height: 500px;
overflow-y: auto;
padding: 10px;
background-color: var(--bg-default-light-color);
Expand Down
6 changes: 3 additions & 3 deletions qcmplusweb/src/components/Exam/Exam.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ const Exam = ({quizId}) => {
}, [questions, startTime]);

const handleSubmit = useCallback(async () => {
if (!getUser || !getUser.userId) {
throw new Error('User is not authenticated');
}
try {
if (!getUser || !getUser.userId) {
throw new Error('User is not authenticated');
}

const endTime = new Date();
const timeSpent = Math.floor((endTime - startTime) / 1000); // Time spent in seconds
Expand Down
3 changes: 1 addition & 2 deletions qcmplusweb/src/components/Exam/ExamResults.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import {Alert, Container, ListGroup} from 'react-bootstrap';

const ExamResults = ({quiz, questions, answers, userAnswers, score}) => (
<Container className="exam-results-container m-0 p-0">
<h2>Quiz {quiz.title}</h2>
<h3 className="text-center p-2">Exam Results: {score} / {questions.length}</h3>
<h3 className="text-center p-2">{quiz.title} Quiz Results: {score} / {questions.length} Correct Answers</h3>
<hr></hr>
<div className="exam-results-list mb-3 p-3">
{questions.map((question, index) => (
Expand Down

0 comments on commit d6d4fd8

Please sign in to comment.