Skip to content

Commit

Permalink
Merge pull request #13 from Pearson-Advance/pearson/PADV-1231
Browse files Browse the repository at this point in the history
PADV-1231 - Remove leading or trailing spaces in lti launch parameters.
  • Loading branch information
Squirrel18 authored Oct 18, 2024
2 parents e84ba38 + d258e43 commit 1f5fd64
Showing 1 changed file with 9 additions and 0 deletions.
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

0 comments on commit 1f5fd64

Please sign in to comment.