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 fde887d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions edx_exams/apps/lti/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@ def test_start_proctoring_launch_data(self, mock_get_lti_launch_url):
proctoring_launch_data=expected_proctoring_launch_data,
context_id=self.course_id,
context_label=self.content_id,
custom_parameters={
'custom_url': 'https://test.learning:2000/exam',
},
)

mock_get_lti_launch_url.assert_called_with(expected_launch_data)
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 @@ -263,6 +263,10 @@ def start_proctoring(request, attempt_id):
context_label=exam.content_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

return redirect(get_lti_1p3_launch_start_url(launch_data))


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 fde887d

Please sign in to comment.