Skip to content

Commit

Permalink
Merge pull request #661 from edx/mroytman/EDUCATOR-4948-null-external-id
Browse files Browse the repository at this point in the history
add a log immediately after exam attempt registration on the backend …
  • Loading branch information
MichaelRoytman authored Mar 20, 2020
2 parents 72a3858 + 78976d9 commit b69fac3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion edx_proctoring/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
from __future__ import absolute_import

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

default_app_config = 'edx_proctoring.apps.EdxProctoringConfig' # pylint: disable=invalid-name
14 changes: 14 additions & 0 deletions edx_proctoring/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,20 @@ def create_exam_attempt(exam_id, user_id, taking_as_proctored=False):
)
log.error(log_msg)

if not external_id and exam['backend'] == 'proctortrack' and taking_as_proctored:
# temporary logging added to better understand cases where we end up
# with exam attempts with NULL external_ids - a situation, that, theoretically,
# shouldn't be occurring (EDUCATOR-4948)
log_msg = (
u'Registered exam attempt with an external ID {external_id}'
u'in {exam_id} for user {user_id}'.format(
external_id=external_id,
exam_id=exam_id,
user_id=user_id,
)
)
log.error(log_msg)

attempt = ProctoredExamStudentAttempt.create_exam_attempt(
exam_id,
user_id,
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": "2.3.2",
"version": "2.3.3",
"main": "edx_proctoring/static/index.js",
"repository": {
"type": "git",
Expand Down

0 comments on commit b69fac3

Please sign in to comment.