Add course flag to send external_user_id as user_id in LTI 1.1 XBlock launches - #307
Merged
michaelroytman merged 1 commit intoNov 21, 2022
Merged
Conversation
michaelroytman
force-pushed
the
mroytman/MST-1717-external-id-LTI-1.1-launches
branch
from
November 18, 2022 21:14
bffc465 to
0b6fbea
Compare
…XBlock launches This commit introduces a new CourseWaffleFlag lti_consumer.enable_external_user_id_1p1_launches. When this flag is enabled for a course, LTI 1.1 XBlock launches in that course will send the user's external_user_id as the user_id attribute of the launch. external_user_id is the user's external user ID as defined, created, and stored by the external_user_ids Djangoapp in the edx-platform. When this waffle is not enabled for a course - the default case - LTI 1.1 XBlock launches in that course will continue to send the user's anonymous_user_id as the user_id attribute of the launch, as before. This provides an opt-in opportunity for courses to send a consistent, static, and opaque user identifier in an LTI 1.1 XBlock launch. This may be necessary for integration with LTI tools that require such an identifier. Please be aware that toggling this flag in a running course carries the risk of breaking the LTI integrations in the course. This flag should also only be enabled for new courses in which no LTI attempts have been made.
michaelroytman
force-pushed
the
mroytman/MST-1717-external-id-LTI-1.1-launches
branch
from
November 18, 2022 21:16
0b6fbea to
cff7744
Compare
Codecov ReportBase: 97.79% // Head: 97.78% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #307 +/- ##
==========================================
- Coverage 97.79% 97.78% -0.01%
==========================================
Files 72 72
Lines 5843 5870 +27
==========================================
+ Hits 5714 5740 +26
- Misses 129 130 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
michaelroytman
deleted the
mroytman/MST-1717-external-id-LTI-1.1-launches
branch
November 21, 2022 14:53
michaelroytman
added a commit
that referenced
this pull request
Nov 29, 2022
… support external user IDs In #307, we added the ability to send a stable, static user identifier (i.e. external user ID) to fix failed launches with the QwikLabs tool. This is because the QwikLabs tool did not work with the course-anonymized user IDs we used to send (i.e. anonymous user IDs). Inadvertently, this change broke the LTI 1.1 Basic Outcomes Service and the LTI 2.0 Result Service for courses that use the external user ID (i.e. they have the lti_consumer.enable_external_user_id_1p1_launches CourseWaffleFlag enabled). The Basic Outcomes Service and Result Service handle grade pass backs. Because we now have two ways to identify a user in LTI 1.1/2.0, we must update the Basic Outcomes Service and Result Service to support both. This commit fixes this bug.
michaelroytman
added a commit
that referenced
this pull request
Nov 29, 2022
… support external user IDs In #307, we added the ability to send a stable, static user identifier (i.e. external user ID) to fix failed launches with the QwikLabs tool. This is because the QwikLabs tool did not work with the course-anonymized user IDs we used to send (i.e. anonymous user IDs). Inadvertently, this change broke the LTI 1.1 Basic Outcomes Service and the LTI 2.0 Result Service for courses that use the external user ID (i.e. they have the lti_consumer.enable_external_user_id_1p1_launches CourseWaffleFlag enabled). The Basic Outcomes Service and Result Service handle grade pass backs. Because we now have two ways to identify a user in LTI 1.1/2.0, we must update the Basic Outcomes Service and Result Service to support both. This commit fixes this bug.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
JIRA: MST-1717
This commit introduces a new
CourseWaffleFlaglti_consumer.enable_external_user_id_1p1_launches. When this flag is enabled for a course, LTI 1.1 XBlock launches in that course will send the user'sexternal_user_idas theuser_idattribute of the launch.external_user_idis the user's external user ID as defined, created, and stored by theexternal_user_idsDjangoapp in the edx-platform. When this waffle is not enabled for a course - the default case - LTI 1.1 XBlock launches in that course will continue to send the user'sanonymous_user_idas theuser_idattribute of the launch, as before.This provides an opt-in opportunity for courses to send a consistent, static, and opaque user identifier in an LTI 1.1 XBlock launch. This may be necessary for integration with LTI tools that require such an identifier.
Please be aware that toggling this flag in a running course carries the risk of breaking the LTI integrations in the course. This flag should also only be enabled for new courses in which no LTI attempts have been made.
Verification:
This change was manually tested using the testing instructions in the README via an integration with the saLTIre testing tool. Please see the screenshots below. They show two courses to demonstrate that, after the change, the
user_idis the same.Before Change, Course 1:
Before Change, Course 2:
After Change, Course 1:
After Change, Course 2:
Testing:
In order to test these changes, follow these steps.
CourseWaffleFlagindjango-waffle > Flags.Name:
lti_consumer.enable_external_user_id_1p1_launchesLeave the remaining fields as the default.
CourseWaffleFlag overrideinWaffle_Utils › Waffle flag course overrides.Waffle flag:
lti_consumer.enable_external_user_id_1p1_launchesCourse id: <course_id of the course you are testing in>
Override choice: Force On
Enabled:
user_idattribute in theMessage Parameterssection.