Commit 6d03609c by Chris Dodge

when user falls out of credit eligibility, don't force decline an already existing attempt

parent ba342390
......@@ -1124,12 +1124,12 @@ def get_student_view(user_id, course_id, content_id,
# so we can mark it as declined
create_exam_attempt(exam_id, user_id)
update_attempt_status(
exam_id,
user_id,
ProctoredExamStudentAttemptStatus.declined,
raise_if_not_found=False
)
update_attempt_status(
exam_id,
user_id,
ProctoredExamStudentAttemptStatus.declined,
raise_if_not_found=False
)
# don't override context, let the courseware show
return None
......
......@@ -726,6 +726,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
@ddt.data(
('reverification', None, True, True, False),
('reverification', 'failed', False, False, True),
('reverification', 'failed', False, True, False),
('reverification', 'satisfied', True, True, False),
('grade', 'failed', True, False, False)
)
......@@ -775,6 +776,10 @@ class ProctoredExamApiTests(LoggedInTestCase):
if mark_as_declined:
attempt = get_exam_attempt(self.proctored_exam_id, self.user_id)
self.assertEqual(attempt['status'], ProctoredExamStudentAttemptStatus.declined)
else:
attempt = get_exam_attempt(self.proctored_exam_id, self.user_id)
if attempt:
self.assertNotEqual(attempt['status'], ProctoredExamStudentAttemptStatus.declined)
def test_student_view_non_student(self):
"""
......
......@@ -34,7 +34,7 @@ def load_requirements(*requirements_paths):
setup(
name='edx-proctoring',
version='0.9.15',
version='0.9.16',
description='Proctoring subsystem for Open edX',
long_description=open('README.md').read(),
author='edX',
......
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