feat: gate exam content using access token (#31653)

Gate access to exam content by requiring an access token. This is a signed JWT issued by the edx-exams service that grants a user access to a sequence locator for a short lived window while an exam is in progress. This feature only applies to courses using the new exam service instead of edx-proctoring.
This commit is contained in:
Zachary Hancock
2023-02-17 10:00:52 -05:00
committed by GitHub
parent 3b1c049429
commit 9522cbdc8b
9 changed files with 146 additions and 1 deletions

View File

@@ -933,6 +933,12 @@ class SequenceBlock(
user_role_in_course = 'staff' if user_is_staff else 'student'
course_id = self.scope_ids.usage_id.context_key
content_id = self.location
course = self._get_course()
# LTI exam tools are not managed by the edx-proctoring library
# Return None rather than reaching into the edx-proctoring subsystem
if course.proctoring_provider == 'lti_external':
return None
context = {
'display_name': self.display_name,