Skip to content

Commit

Permalink
fix: null checking issue in exam entry (#148)
Browse files Browse the repository at this point in the history
* fix: null checking issue in exam entry
  • Loading branch information
Zacharis278 authored Jul 19, 2024
1 parent c41adcb commit fd8a9d7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/data/thunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,6 @@ export function getAllowProctoringOptOut(allowProctoringOptOut) {
export function checkExamEntry() {
return async (dispatch, getState) => {
const { exam } = getState().specialExams;
const useLegacyAttemptAPI = exam.attempt.use_legacy_attempt_api;
// Check only applies to LTI exams
if (
!exam?.attempt
Expand All @@ -562,7 +561,7 @@ export function checkExamEntry() {
}),
]).catch(() => {
dispatch(setApiError({ errorMsg: 'Something has gone wrong with your exam. Proctoring application not detected.' }));
updateAttemptAfter(exam.course_id, exam.content_id, endExamWithFailure(exam.attempt.attempt_id, 'exam reentry disallowed', useLegacyAttemptAPI))(dispatch);
updateAttemptAfter(exam.course_id, exam.content_id, endExamWithFailure(exam.attempt.attempt_id, 'exam reentry disallowed', false))(dispatch);
});
}
};
Expand Down

0 comments on commit fd8a9d7

Please sign in to comment.