Commit f69f3e4d by chrisndodge

Merge pull request #91 from edx/cdodge/timeout-transitions-to-submitted

when a timeout occurs, state transition to submitted since the user h…
parents 5b048da5 0e9e78fa
...@@ -518,7 +518,7 @@ def update_attempt_status(exam_id, user_id, to_status, raise_if_not_found=True): ...@@ -518,7 +518,7 @@ def update_attempt_status(exam_id, user_id, to_status, raise_if_not_found=True):
not settings.PROCTORING_SETTINGS.get('ALLOW_TIMED_OUT_STATE', False) not settings.PROCTORING_SETTINGS.get('ALLOW_TIMED_OUT_STATE', False)
) )
if alias_timeout: if alias_timeout:
to_status = ProctoredExamStudentAttemptStatus.ready_to_submit to_status = ProctoredExamStudentAttemptStatus.submitted
exam_attempt_obj = ProctoredExamStudentAttempt.objects.get_exam_attempt(exam_id, user_id) exam_attempt_obj = ProctoredExamStudentAttempt.objects.get_exam_attempt(exam_id, user_id)
if exam_attempt_obj is None: if exam_attempt_obj is None:
......
...@@ -487,7 +487,7 @@ class ProctoredExamApiTests(LoggedInTestCase): ...@@ -487,7 +487,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
proctored_exam_student_attempt = self._create_unstarted_exam_attempt() proctored_exam_student_attempt = self._create_unstarted_exam_attempt()
self.assertIsNone(proctored_exam_student_attempt.completed_at) self.assertIsNone(proctored_exam_student_attempt.completed_at)
proctored_exam_attempt_id = mark_exam_attempt_timeout( proctored_exam_attempt_id = mark_exam_attempt_timeout(
proctored_exam_student_attempt.proctored_exam, self.user_id proctored_exam_student_attempt.proctored_exam.id, self.user_id
) )
self.assertEqual(proctored_exam_student_attempt.id, proctored_exam_attempt_id) self.assertEqual(proctored_exam_student_attempt.id, proctored_exam_attempt_id)
...@@ -1116,7 +1116,7 @@ class ProctoredExamApiTests(LoggedInTestCase): ...@@ -1116,7 +1116,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
def test_alias_timed_out(self): def test_alias_timed_out(self):
""" """
Verified that timed_out will automatically state transition Verified that timed_out will automatically state transition
to ready_to_submit to submitted
""" """
exam_attempt = self._create_started_exam_attempt() exam_attempt = self._create_started_exam_attempt()
...@@ -1130,7 +1130,7 @@ class ProctoredExamApiTests(LoggedInTestCase): ...@@ -1130,7 +1130,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
self.assertEqual( self.assertEqual(
exam_attempt['status'], exam_attempt['status'],
ProctoredExamStudentAttemptStatus.ready_to_submit ProctoredExamStudentAttemptStatus.submitted
) )
def test_update_unexisting_attempt(self): def test_update_unexisting_attempt(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment