Skip to content

Commit

Permalink
fix: clear all ProctoredExamSoftwareSecureReviewHistory instances of PII
Browse files Browse the repository at this point in the history
This commit changes the time at which we read instances of the ProctoredExamSoftwareSecureReviewHistory model. This is necessary because the act of saving the ProctoredExamSoftwareSecureReview model causes the pre-save instance to be saved to the ProctoredExamSoftwareSecureReviewHistory table. Because we read instances of the ProctoredExamSoftwareSecureReviewHistory model prior to calling save on the instances of the ProctoredExamSoftwareSecureReview model, we do not have the full queryset we need. Reading the instances of the ProctoredExamSoftwareSecureReviewHistory model from the database after we clear all the instances of the ProctoredExamSoftwareSecureReview model fixes this issue.
  • Loading branch information
MichaelRoytman committed Feb 7, 2025
1 parent ebee8a3 commit 1173d17
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 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
~~~~~~~~~~

[5.1.1] - 2025-02-07
~~~~~~~~~~~~~~~~~~~~
* fixes bug in ordering of query to ensure all Software Secure history is cleared of PII via the retirement endpoint

[5.1.0] - 2025-02-03
~~~~~~~~~~~~~~~~~~~~
* add Software Secure review, history, and comment models to retirement endpoint
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,4 +3,4 @@
"""

# Be sure to update the version number in edx_proctoring/package.json
__version__ = '5.1.0'
__version__ = '5.1.1'
3 changes: 1 addition & 2 deletions edx_proctoring/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2275,8 +2275,6 @@ def _retire_proctored_exam_software_secure_review_and_history_and_comment(self,

# Retire reviews and review history.
reviews = ProctoredExamSoftwareSecureReview.objects.filter(attempt_code=attempt_code)
review_history = ProctoredExamSoftwareSecureReviewHistory.objects.filter(attempt_code=attempt_code)

for review in reviews:
review.encrypted_video_url = b''
review.raw_data = ''
Expand All @@ -2285,6 +2283,7 @@ def _retire_proctored_exam_software_secure_review_and_history_and_comment(self,
# and must save each review one-by-one.
review.save()

review_history = ProctoredExamSoftwareSecureReviewHistory.objects.filter(attempt_code=attempt_code)
for review in review_history:
review.encrypted_video_url = b''
review.raw_data = ''
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": "5.1.0",
"version": "5.1.1",
"main": "edx_proctoring/static/index.js",
"scripts": {
"test": "gulp test"
Expand Down

0 comments on commit 1173d17

Please sign in to comment.