Skip to content

Commit

Permalink
Merge pull request #1036 from openedx/alangsto/remove_idv_references
Browse files Browse the repository at this point in the history
feat: remove IDV references from proctoring
  • Loading branch information
alangsto authored Apr 4, 2022
2 parents 97fa6ac + 4edd314 commit 790d4fe
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 120 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Change Log
Unreleased
~~~~~~~~~~

[4.10.0] - 2022-04-04
~~~~~~~~~~~~~~~~~~~~~
* Remove IDV as a prerequisite to proctored exams

[4.9.0] - 2022-01-25
~~~~~~~~~~~~~~~~~~~~
* Dropped Django22, 30 and 31
Expand All @@ -22,7 +26,7 @@ Unreleased
[4.8.4] - 2022-01-12
~~~~~~~~~~~~~~~~~~~~
* Return better http status when review callback resulted in the original
exam no longer being proctored
exam no longer being proctored

[4.8.3] - 2022-01-12
~~~~~~~~~~~~~~~~~~~~
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__ = '4.9.0'
__version__ = '4.10.0'

default_app_config = 'edx_proctoring.apps.EdxProctoringConfig' # pylint: disable=invalid-name
14 changes: 1 addition & 13 deletions edx_proctoring/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,9 +834,6 @@ def get_exam_attempt_data(exam_id, attempt_id, is_learning_mfe=False):
'ping_interval': provider.ping_interval,
'attempt_code': attempt['attempt_code']
})
# in case user is not verified we need to send them to verification page
if attempt['status'] == ProctoredExamStudentAttemptStatus.created:
attempt_data['verification_url'] = f'{settings.ACCOUNT_MICROFRONTEND_URL}/id-verification'
if attempt['status'] in (
ProctoredExamStudentAttemptStatus.created,
ProctoredExamStudentAttemptStatus.download_software_clicked
Expand Down Expand Up @@ -2228,7 +2225,6 @@ def _are_prerequirements_satisfied(

JUMPTO_SUPPORTED_NAMESPACES = [
'proctored_exam',
'reverification',
]


Expand Down Expand Up @@ -2861,15 +2857,7 @@ 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 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'
student_view_template = 'proctored_exam/instructions.html'
elif attempt_status == ProctoredExamStudentAttemptStatus.ready_to_start:
student_view_template = 'proctored_exam/ready_to_start.html'
elif attempt_status == ProctoredExamStudentAttemptStatus.error:
Expand Down
62 changes: 0 additions & 62 deletions edx_proctoring/templates/proctored_exam/id_verification.html

This file was deleted.

10 changes: 2 additions & 8 deletions edx_proctoring/tests/test_mfe_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,13 @@ def setUp(self):
self.course_scheduled_sections,
))

def assertHasExamData(self, response_data, has_attempt,
has_verification_url=False, has_download_url=False, content_id=None):
def assertHasExamData(self, response_data, has_attempt, has_download_url=False, content_id=None):
""" Ensure expected exam data is present. """
exam_data = response_data['exam']
assert 'exam' in response_data
assert 'attempt' in exam_data
if has_attempt:
assert exam_data['attempt']
if has_verification_url:
assert exam_data['attempt']['verification_url']
if has_download_url:
assert 'software_download_url' in exam_data['attempt']
else:
Expand Down Expand Up @@ -264,8 +261,7 @@ def test_prerequisites_are_not_checked_if_exam_is_not_proctored(self, content_id
def test_exam_data_contains_necessary_data_based_on_the_attempt_status(self, status):
"""
Tests the GET exam attempts data contains software download url ONLY when attempt
is in created or download_software_clicked status and contains verification
url ONLY when attempt is in created status
is in created or download_software_clicked status
"""
self._create_exam_attempt(self.proctored_exam_id, status=status)

Expand All @@ -275,13 +271,11 @@ def test_exam_data_contains_necessary_data_based_on_the_attempt_status(self, sta
ProctoredExamStudentAttemptStatus.created,
ProctoredExamStudentAttemptStatus.download_software_clicked
)
has_verification_url = status == ProctoredExamStudentAttemptStatus.created
response_data = json.loads(response.content.decode('utf-8'))
self.assertHasExamData(
response_data,
has_attempt=True,
has_download_url=has_download_url,
has_verification_url=has_verification_url,
)

@ddt.data(
Expand Down
34 changes: 0 additions & 34 deletions edx_proctoring/tests/test_student_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ def _render_exam(self, content_id, context_overrides=None):
'enrollment_mode': 'verified',
'credit_requirement_status': [],
},
'verification_status': 'approved',
'verification_url': '/reverify',
'is_integrity_signature_enabled': False,
}
if context_overrides:
Expand All @@ -124,8 +122,6 @@ def render_proctored_exam(self, context_overrides=None):
'enrollment_mode': 'verified',
'credit_requirement_status': [],
},
'verification_status': 'approved',
'verification_url': '/reverify',
}
if context_overrides:
exam_context_overrides.update(context_overrides)
Expand Down Expand Up @@ -187,36 +183,6 @@ def test_get_honor_view_with_practice_exam(self):
})
self.assertIsNotNone(rendered_response)

@ddt.data(
(None, 'Make sure you are on a computer with a webcam, and that you have valid photo identification'),
('pending', 'Your verification is pending'),
('must_reverify', 'Your verification attempt failed'),
('expired', 'Your verification has expired'),
)
@ddt.unpack
def test_verification_status(self, verification_status, expected_message):
"""
This test asserts that the correct id verification message is shown
to the user when they choose to take a proctored exam.
"""
self._create_unstarted_exam_attempt()
rendered_response = self.render_proctored_exam({
'verification_status': verification_status,
})
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
@@ -1,7 +1,7 @@
{
"name": "@edx/edx-proctoring",
"//": "Note that the version format is slightly different than that of the Python version when using prereleases.",
"version": "4.9.0",
"version": "4.10.0",
"main": "edx_proctoring/static/index.js",
"scripts": {
"test": "gulp test"
Expand Down

0 comments on commit 790d4fe

Please sign in to comment.