refactor: convert course_module term to course_block

This commit is contained in:
0x29a
2022-10-27 03:24:30 +02:00
committed by Piotr Surowiec
parent d3fee38a37
commit 83396ffb07
62 changed files with 335 additions and 335 deletions

View File

@@ -582,8 +582,8 @@ def is_enrollment_valid_for_proctoring(username, course_id):
return False
# Check that the course has proctored exams enabled
course_module = modulestore().get_course(course_id)
if not course_module or not course_module.enable_proctored_exams:
course_block = modulestore().get_course(course_id)
if not course_block or not course_block.enable_proctored_exams:
return False
# Only allow verified modes
@@ -592,7 +592,7 @@ def is_enrollment_valid_for_proctoring(username, course_id):
]
# If the proctoring provider allows learners in honor mode to take exams, include it
if settings.PROCTORING_BACKENDS.get(course_module.proctoring_provider, {}).get('allow_honor_mode'):
if settings.PROCTORING_BACKENDS.get(course_block.proctoring_provider, {}).get('allow_honor_mode'):
appropriate_modes.append(CourseMode.HONOR)
if enrollment['mode'] not in appropriate_modes: