Skip to content

Commit

Permalink
Merge pull request #815 from edx/bseverino/error-message-update
Browse files Browse the repository at this point in the history
[MST-695] Update error message for proctored exams
  • Loading branch information
bseverino committed Mar 17, 2021
2 parents 2445967 + 2f8cb1a commit ddaa14c
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 33 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Change Log
Unreleased
~~~~~~~~~~

[3.7.13] - 2021-03-16
~~~~~~~~~~~~~~~~~~~~~
* Update proctored exam error message to remove statement that the user must restart their exam
from scratch, and include a proctoring escalation email rather than a link to support if
applicable.

[3.7.12] - 2021-03-15
~~~~~~~~~~~~~~~~~~~~~
* Update the onboarding status to take into account sections that are not accessible to the user
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.7.12'
__version__ = '3.7.13'

default_app_config = 'edx_proctoring.apps.EdxProctoringConfig' # pylint: disable=invalid-name
36 changes: 20 additions & 16 deletions edx_proctoring/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1332,22 +1332,7 @@ def create_proctoring_attempt_status_email(user_id, exam_attempt_obj, course_nam

# If the course has a proctoring escalation email set, use that rather than edX Support.
# Currently only courses using Proctortrack will have this set.
proctoring_escalation_email = None
instructor_service = get_runtime_service('instructor')
if instructor_service:
try:
proctoring_escalation_email = instructor_service.get_proctoring_escalation_email(course_id)
except (InvalidKeyError, ObjectDoesNotExist):
log.warning(
'While creating proctoring status email for user_id={user_id} in exam_id={exam_id}, '
'could not retrieve proctoring escalation email with course_id={course_id}. Using '
'default contact URL.'.format(
user_id=user_id,
exam_id=exam_attempt_obj.proctored_exam.id,
course_id=course_id,
)
)

proctoring_escalation_email = _get_proctoring_escalation_email(course_id)
if proctoring_escalation_email:
contact_url = 'mailto:{}'.format(proctoring_escalation_email)
contact_url_text = proctoring_escalation_email
Expand Down Expand Up @@ -1398,6 +1383,24 @@ def _get_email_template_paths(template_name, backend):
return [base_template]


def _get_proctoring_escalation_email(course_id):
"""
Returns the proctoring escalation email for a course as a string, if it exists,
otherwise returns None.
"""
proctoring_escalation_email = None
instructor_service = get_runtime_service('instructor')
if instructor_service:
try:
proctoring_escalation_email = instructor_service.get_proctoring_escalation_email(course_id)
except (InvalidKeyError, ObjectDoesNotExist):
log.warning(
'Could not retrieve proctoring escalation email for course_id={course_id}. '
'Using default support contact URL instead.'.format(course_id=course_id)
)
return proctoring_escalation_email


def reset_practice_exam(exam_id, user_id, requesting_user):
"""
Resets a completed practice exam attempt back to the created state.
Expand Down Expand Up @@ -2137,6 +2140,7 @@ def _get_proctored_exam_context(exam, attempt, user_id, course_id, is_practice_e
) if attempt else '',
'link_urls': settings.PROCTORING_SETTINGS.get('LINK_URLS', {}),
'tech_support_email': settings.TECH_SUPPORT_EMAIL,
'proctoring_escalation_email': _get_proctoring_escalation_email(course_id),
'exam_review_policy': _get_review_policy_by_exam_id(exam['id']),
'backend_js_bundle': provider.get_javascript(),
'provider_tech_support_email': provider.tech_support_email,
Expand Down
30 changes: 16 additions & 14 deletions edx_proctoring/templates/proctored_exam/error.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@ <h3>
{% endblocktrans %}
</h3>

<p>
{% blocktrans %}
A technical error has occurred with your proctored exam. Please
reach out to <a href="{{link_urls.contact_us}}" target="_blank">
edX Support</a> and your course team immediately for assistance.
{% endblocktrans %}
</p>
<p>
{% blocktrans %}
Once the error is resolved, you will need to restart the exam
and answer all questions again. If you have concerns about your
proctoring session results, please contact your course team.
{% endblocktrans %}
</p>
<p>
{% if proctoring_escalation_email %}
{% blocktrans %}
A system error has occurred with your proctored exam. Please reach out to your course
team at <a href="mailto:{{proctoring_escalation_email}}">{{proctoring_escalation_email}}</a>
for assistance, and return to the exam once you receive further instructions.
{% endblocktrans %}
{% else %}
{% blocktrans %}
A system error has occurred with your proctored exam. Please reach out to
<a href="{{link_urls.contact_us}}" target="_blank">{{platform_name}} Support</a> for
assistance, and return to the exam once you receive further instructions.
{% endblocktrans %}
{% endif %}
</p>

</div>
{% include 'proctored_exam/footer.html' %}
2 changes: 1 addition & 1 deletion edx_proctoring/tests/test_student_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def setUp(self):
self.timed_exam_submitted_expired = 'The time allotted for this exam has expired. Your exam has been submitted'
self.submitted_timed_exam_msg_with_due_date = 'After the due date has passed,'
self.exam_time_expired_msg = 'You did not complete the exam in the allotted time'
self.exam_time_error_msg = 'A technical error has occurred with your proctored exam'
self.exam_time_error_msg = 'A system error has occurred with your proctored exam'
self.chose_proctored_exam_msg = 'Set up and start your proctored exam'
self.proctored_exam_optout_msg = 'Take this exam without proctoring'
self.proctored_exam_completed_msg = 'Are you sure you want to end your proctored exam'
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.7.12",
"version": "3.7.13",
"main": "edx_proctoring/static/index.js",
"scripts":{
"test":"gulp test"
Expand Down

0 comments on commit ddaa14c

Please sign in to comment.