Commit b614a56f by Chris Dodge

Update the call to the utility method to expect a tuple to be returned

parent 6f649553
...@@ -119,8 +119,8 @@ class ProctoredExamSoftwareSecureReviewAdmin(admin.ModelAdmin): ...@@ -119,8 +119,8 @@ class ProctoredExamSoftwareSecureReviewAdmin(admin.ModelAdmin):
def _get_exam_from_attempt_code(self, code): def _get_exam_from_attempt_code(self, code):
"""Get exam from attempt code. Note that the attempt code could be an archived one""" """Get exam from attempt code. Note that the attempt code could be an archived one"""
attempt = locate_attempt_by_attempt_code(code) (attempt_obj, __) = locate_attempt_by_attempt_code(code)
return attempt.proctored_exam if attempt else None return attempt_obj.proctored_exam if attempt_obj else None
def course_id_for_review(self, obj): def course_id_for_review(self, obj):
"""Return course_id associated with review""" """Return course_id associated with review"""
...@@ -143,8 +143,8 @@ class ProctoredExamSoftwareSecureReviewAdmin(admin.ModelAdmin): ...@@ -143,8 +143,8 @@ class ProctoredExamSoftwareSecureReviewAdmin(admin.ModelAdmin):
if obj.student: if obj.student:
return obj.student.username return obj.student.username
else: else:
attempt = locate_attempt_by_attempt_code(obj.attempt_code) (attempt_obj, __) = locate_attempt_by_attempt_code(obj.attempt_code)
return attempt.user.username if attempt else '(None)' return attempt_obj.user.username if attempt_obj else '(None)'
list_display = [ list_display = [
'course_id_for_review', 'course_id_for_review',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment