Skip to content

Commit

Permalink
Merge pull request #869 from edx/bseverino/integrity-signature
Browse files Browse the repository at this point in the history
[MST-838] Disable IDV check if integrity signature is enabled
  • Loading branch information
bseverino committed Jun 4, 2021
2 parents a94ab2d + d4f7266 commit b1a6f23
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Change Log
Unreleased
~~~~~~~~~~

[3.12.0] - 2021-06-04
~~~~~~~~~~~~~~~~~~~~~
* If the `is_integrity_signature_enabled` waffle flag is turned on, do not render the ID verification
template for proctored exams.

[3.11.6] - 2021-06-03
~~~~~~~~~~~~~~~~~~~~~
* Add logging for attempt status transitions caused by a time out or reattempt
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"""

# Be sure to update the version number in edx_proctoring/package.json
__version__ = '3.11.6'
__version__ = '3.12.0'

default_app_config = 'edx_proctoring.apps.EdxProctoringConfig' # pylint: disable=invalid-name
8 changes: 6 additions & 2 deletions edx_proctoring/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2491,8 +2491,12 @@ def _get_proctored_exam_view(exam, context, exam_id, user_id, course_id):
return None
elif attempt_status in [ProctoredExamStudentAttemptStatus.created,
ProctoredExamStudentAttemptStatus.download_software_clicked]:
if context.get('verification_status') is not APPROVED_STATUS:
# if the user has not id verified yet, show them the page that requires them to do so
if not (
context.get('is_integrity_signature_enabled')
or context.get('verification_status') is APPROVED_STATUS
):
# if the user has not id verified yet, show them the page that requires them to do so,
# unless the integrity signature feature is enabled
student_view_template = 'proctored_exam/id_verification.html'
else:
student_view_template = 'proctored_exam/instructions.html'
Expand Down
13 changes: 13 additions & 0 deletions edx_proctoring/tests/test_student_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def _render_exam(self, content_id, context_overrides=None):
},
'verification_status': 'approved',
'verification_url': '/reverify',
'is_integrity_signature_enabled': False,
}
if context_overrides:
context.update(context_overrides)
Expand Down Expand Up @@ -202,6 +203,18 @@ def test_verification_status(self, verification_status, expected_message):
})
self.assertIn(expected_message, rendered_response)

def test_integrity_signature_enabled(self):
"""
This test asserts that the ID verification message is not shown if the
integrity signature feature is enabled.
"""
self._create_unstarted_exam_attempt()
rendered_response = self.render_proctored_exam({
'verification_status': None,
'is_integrity_signature_enabled': True,
})
self.assertIn(self.chose_proctored_exam_msg, rendered_response)

def test_proctored_only_entrance(self):
"""
This test verifies that learners are not given the option to take
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@edx/edx-proctoring",
"//": "Be sure to update the version number in edx_proctoring/__init__.py",
"//": "Note that the version format is slightly different than that of the Python version when using prereleases.",
"version": "3.11.6",
"version": "3.12.0",
"main": "edx_proctoring/static/index.js",
"scripts": {
"test": "gulp test"
Expand Down

0 comments on commit b1a6f23

Please sign in to comment.