Skip to content

Commit

Permalink
feat: send custom_url param to LTI tool
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharis278 committed Dec 7, 2023
1 parent 955a259 commit e8da2cb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions edx_exams/apps/lti/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ def test_lti_launch(self, mock_create_launch_url):
context_id=self.exam.course_id,
custom_parameters={
'roster_url': 'http://test.exams:18740/lti/exam/1/instructor_tool/roster',
'custom_url': 'https://test.learning:2000/exam',
}
)
)
Expand Down
4 changes: 4 additions & 0 deletions edx_exams/apps/lti/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ def launch_instructor_tool(request, exam_id):
}
)

# temporary addition for testing with Proctorio in stage
if settings.LTI_CUSTOM_URL_CLAIM: # pragma: no cover
launch_data.custom_parameters['custom_url'] = settings.LTI_CUSTOM_URL_CLAIM

# user is authenticated via JWT so use that to create a
# session with this service's authentication backend
request.user.backend = EDX_OAUTH_BACKEND
Expand Down
2 changes: 2 additions & 0 deletions edx_exams/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ def root(*path_fragments):

EXAMS_DASHBOARD_MFE_URL = None

LTI_CUSTOM_URL_CLAIM = None

# Event Bus Settings
EXAM_ATTEMPT_EVENTS_KAFKA_TOPIC_NAME = 'learning-exam-attempt-lifecycle'

Expand Down
1 change: 1 addition & 0 deletions edx_exams/settings/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
LTI_API_BASE = 'http://localhost:18740'
LMS_ROOT_URL = 'http://localhost:18000'
LEARNING_MICROFRONTEND_URL = 'http://localhost:2000'
LTI_CUSTOM_URL_CLAIM = 'http://localhost:2000'
EXAMS_DASHBOARD_MFE_URL = 'http://localhost:2020'

CORS_ORIGIN_WHITELIST = (
Expand Down
1 change: 1 addition & 0 deletions edx_exams/settings/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
LTI_API_BASE = 'http://test.exams:18740'
LMS_ROOT_URL = 'http://test.lms:18000'
LEARNING_MICROFRONTEND_URL = 'http://test.learning:2000'
LTI_CUSTOM_URL_CLAIM = 'https://test.learning:2000/exam'

TOKEN_SIGNING.update({
'JWT_PRIVATE_SIGNING_JWK': '''{
Expand Down

0 comments on commit e8da2cb

Please sign in to comment.