Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PADV-1231 - Remove leading or trailing spaces in lti launch parameters. #13

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lti_consumer/lti_1p1/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,15 @@ def generate_launch_request(self, resource_link_id):
'Content-Type': 'application/x-www-form-urlencoded',
}

# This block removes any leading or trailing spaces in lti parameters.
# We are currently experiencing a launch issue with the Measure UP LTI integration (MUP)
# due to some courses having leading or trailing spaces in their names.
# We decided to handle this from our side to avoid launch request issues
# and due to lack of coordination and communication with the MUP team to fix this from their side.
for lti_parameter, lti_parameter_value in lti_parameters.items():
if isinstance(lti_parameter_value, str):
lti_parameters[lti_parameter] = lti_parameter_value.strip()

oauth_signature = get_oauth_request_signature(
self.oauth_key,
self.oauth_secret,
Expand Down
Loading