Skip to content

Commit

Permalink
fix: Set the to be retired column video_url on ProctoredExamSoftwareS…
Browse files Browse the repository at this point in the history
…ecureReview to be nullable (#987)

The video_url field on ProctoredExamSoftwareSecureReview table is not being used. This is the first PR to remove the field by removing the reference of the field in code

Co-authored-by: Simon Chen <[email protected]>
  • Loading branch information
schenedx and Simon Chen authored Oct 28, 2021
1 parent a8510c5 commit edea764
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 11 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
~~~~~~~~~~

[4.3.1] - 2021-10-28
~~~~~~~~~~~~~~~~~~~~
* Set the to be retired column video_url on ProctoredExamSoftwareSecureReview to be nullable.

[4.3.0] - 2021-10-28
~~~~~~~~~~~~~~~~~~~~
* Upgrade the requirements and move edx-proctoring to be on Django 3.2 instead of Django 2.2
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.3.0'
__version__ = '4.3.1'

default_app_config = 'edx_proctoring.apps.EdxProctoringConfig' # pylint: disable=invalid-name
7 changes: 0 additions & 7 deletions edx_proctoring/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,6 @@ def save_model(self, request, obj, form, change):
obj.reviewed_by = request.user
obj.save()

def get_form(self, request, obj=None, change=False, **kwargs):
""" Returns software secure review form """
form = super().get_form(request, obj, change, **kwargs)
if 'video_url' in form.base_fields:
del form.base_fields['video_url']
return form

def lookup_allowed(self, lookup, value):
""" Checks if lookup allowed or not """
if lookup == 'exam__course_id':
Expand Down
23 changes: 23 additions & 0 deletions edx_proctoring/migrations/0020_auto_20211028_1915.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 2.2.24 on 2021-10-28 19:15

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('edx_proctoring', '0019_proctoredexamsoftwaresecurereview_encrypted_video_url'),
]

operations = [
migrations.AlterField(
model_name='proctoredexamsoftwaresecurereview',
name='video_url',
field=models.TextField(null=True),
),
migrations.AlterField(
model_name='proctoredexamsoftwaresecurereviewhistory',
name='video_url',
field=models.TextField(null=True),
),
]
4 changes: 2 additions & 2 deletions edx_proctoring/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ class ProctoredExamSoftwareSecureReview(TimeStampedModel):
# URL for the exam video that had been reviewed
# NOTE: To be deleted in future release, once the code that depends on it
# has been removed
video_url = models.TextField()
video_url = models.TextField(null=True)

# Encrypted URL for the exam video that had been reviewed
encrypted_video_url = models.BinaryField(null=True)
Expand Down Expand Up @@ -850,7 +850,7 @@ class ProctoredExamSoftwareSecureReviewHistory(TimeStampedModel):
raw_data = models.TextField()

# URL for the exam video that had been reviewed
video_url = models.TextField()
video_url = models.TextField(null=True)

# user_id of person who did the review (can be None if submitted via server-to-server API)
reviewed_by = models.ForeignKey(USER_MODEL, null=True, related_name='+', on_delete=models.CASCADE)
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.3.0",
"version": "4.3.1",
"main": "edx_proctoring/static/index.js",
"scripts": {
"test": "gulp test"
Expand Down

0 comments on commit edea764

Please sign in to comment.