diff --git a/src/exam/Exam.jsx b/src/exam/Exam.jsx index a0eae7fc..e89b9cce 100644 --- a/src/exam/Exam.jsx +++ b/src/exam/Exam.jsx @@ -49,6 +49,10 @@ const Exam = ({ isTimeLimited, children }) => { const sequenceContent = <>{children}; + // Temporary fix for CR-3842. We need to show this timer but the end exam button does not + // fully work yet. + const allowEndExam = !!examId; + return (
{showTimer && ( @@ -58,6 +62,7 @@ const Exam = ({ isTimeLimited, children }) => { expireExamAttempt={expireExam} pollExamAttempt={pollAttempt} pingAttempt={pingAttempt} + allowEndExam={allowEndExam} /> )} {apiErrorMsg && } diff --git a/src/timer/ExamTimerBlock.jsx b/src/timer/ExamTimerBlock.jsx index 0b32bd0b..d88999ba 100644 --- a/src/timer/ExamTimerBlock.jsx +++ b/src/timer/ExamTimerBlock.jsx @@ -16,7 +16,7 @@ import { * Exam timer block component. */ const ExamTimerBlock = injectIntl(({ - attempt, stopExamAttempt, expireExamAttempt, pollExamAttempt, intl, pingAttempt, + attempt, stopExamAttempt, expireExamAttempt, pollExamAttempt, intl, pingAttempt, allowEndExam, }) => { const [isShowMore, showMore, showLess] = useToggle(false); const [alertVariant, setAlertVariant] = useState('info'); @@ -94,6 +94,7 @@ const ExamTimerBlock = injectIntl(({ > {attempt.attempt_status !== ExamStatus.READY_TO_SUBMIT + && allowEndExam && (