canvas-lms
canvas-lms copied to clipboard
LTI 1.3 Variable Substitutions for Sections should not use a comma-separated string on the API response.
Summary:
Regarding release https://community.canvaslms.com/t5/Canvas-Change-Log/2022-API-Change-Log/ta-p/509738 https://canvas.beta.instructure.com/doc/api/file.tools_variable_substitutions.html the addition of Canvas.course.sectionIds on the LTI 1.3 names and roles service. We're getting the section names for the users just fine, but they are a comma-separated string.
This is creating issues when separating multiple sections because It's also possible for a section name to have a comma. Therefore, when we separate on commas and we have a section with a comma in it, we are unable to accurately separate the sections on our end.
"https://purl.imsglobal.org/spec/lti/claim/custom": {
"student_id": "GONZOSISID",
"section_names": "test section 1 ,Gradescope Testing Staging, CA Course 001",
"preferred_geography": "ca"
},
In the response above we would separate 3 different sections using the comma as the separator:
- test section 1
- Gradescope Testing Staging
- CA Course 001
We should only separate two as the names of the sections would be the following:
- test section 1
- Gradescope Testing Staging, CA Course 001
This is why a comma-separated value will not work in this case.
Steps to reproduce:
- Update the LTI 1.3 Dev Key to include Canvas.course.sectionIds
- Create a user with multiple sections and the section names should include a comma.
- Make Resource Link API Call to https://canvas.beta.instructure.com/doc/api/names_and_role.html API. You must include the rlid parameter.