From 3601e82f71a76cdea1b47059d82fdfa00cee6216 Mon Sep 17 00:00:00 2001 From: Marcos Prieto Date: Tue, 6 Feb 2024 10:57:17 +0100 Subject: [PATCH] Include display_name in the Canvas custom variables --- lms/templates/config.xml.jinja2 | 1 + lms/views/canvas/config.py | 1 + tests/unit/lms/views/canvas/config_test.py | 1 + 3 files changed, 3 insertions(+) diff --git a/lms/templates/config.xml.jinja2 b/lms/templates/config.xml.jinja2 index 8dcfe71fcd..14f2eeda54 100644 --- a/lms/templates/config.xml.jinja2 +++ b/lms/templates/config.xml.jinja2 @@ -18,6 +18,7 @@ http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticp_v1p0.xsd"> $Canvas.course.id $Canvas.api.domain + $Person.name.display diff --git a/lms/views/canvas/config.py b/lms/views/canvas/config.py index 9b2ec8b1be..fb2baba96c 100644 --- a/lms/views/canvas/config.py +++ b/lms/views/canvas/config.py @@ -80,6 +80,7 @@ def config_json(request): "custom_canvas_course_id": "$Canvas.course.id", "custom_canvas_api_domain": "$Canvas.api.domain", "custom_canvas_user_id": "$Canvas.user.id", + "custom_display_name": "$Person.name.display", }, "scopes": [ "https://purl.imsglobal.org/spec/lti-ags/scope/score", diff --git a/tests/unit/lms/views/canvas/config_test.py b/tests/unit/lms/views/canvas/config_test.py index 7db4056ca1..e770db9acb 100644 --- a/tests/unit/lms/views/canvas/config_test.py +++ b/tests/unit/lms/views/canvas/config_test.py @@ -49,6 +49,7 @@ def test_it(self, pyramid_request): "custom_canvas_course_id": "$Canvas.course.id", "custom_canvas_api_domain": "$Canvas.api.domain", "custom_canvas_user_id": "$Canvas.user.id", + "custom_display_name": "$Person.name.display", }, "scopes": [ "https://purl.imsglobal.org/spec/lti-ags/scope/score",