Skip to content

Commit

Permalink
Merge pull request #868 from edx/alangsto/update_logs
Browse files Browse the repository at this point in the history
fix: Add log message for timed out attempt or re-attempt
  • Loading branch information
alangsto committed Jun 3, 2021
2 parents ac15e68 + 5edf742 commit a94ab2d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Change Log
Unreleased
~~~~~~~~~~

[3.11.6] - 2021-06-03
~~~~~~~~~~~~~~~~~~~~~
* Add logging for attempt status transitions caused by a time out or reattempt

[3.11.5] - 2021-06-01
~~~~~~~~~~~~~~~~~~~~~
* Fix a bug where we are to pass to vendor javascript a value in milliseconds, instead of just seconds
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.5'
__version__ = '3.11.6'

default_app_config = 'edx_proctoring.apps.EdxProctoringConfig' # pylint: disable=invalid-name
9 changes: 9 additions & 0 deletions edx_proctoring/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,15 @@ def update_attempt_status(attempt_id, to_status,

user_trying_to_reattempt = is_reattempting_exam(from_status, to_status)
if treat_timeout_as_submitted or user_trying_to_reattempt:
detail = 'the attempt was timed out' if treat_timeout_as_submitted else 'the user reattempted the exam'
log_msg = (
'Attempt status for exam_id={exam_id} for user_id={user_id} will not be updated to '
'"{to_status}" because {submitted_message}. Instead the attempt '
'status will be updated to "submitted"'.format(
exam_id=exam_id, user_id=user_id, to_status=to_status, submitted_message=detail
)
)
log.info(log_msg)
to_status = ProctoredExamStudentAttemptStatus.submitted

exam = get_exam_by_id(exam_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": "3.11.5",
"version": "3.11.6",
"main": "edx_proctoring/static/index.js",
"scripts": {
"test": "gulp test"
Expand Down

0 comments on commit a94ab2d

Please sign in to comment.