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.
Expected behavior: Instead of sending a comma-separated string on the API response, we should use a different structure to separate each section. Another solution would be to not allow users to create sections with commas.
Actual behavior: A comma-separated string that will not allow us to accurately separate sections when a user creates a section name with commas in it.
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.
In the response above we would separate 3 different sections using the comma as the separator:
We should only separate two as the names of the sections would be the following:
This is why a comma-separated value will not work in this case.
Steps to reproduce:
Expected behavior: Instead of sending a comma-separated string on the API response, we should use a different structure to separate each section. Another solution would be to not allow users to create sections with commas.
Actual behavior: A comma-separated string that will not allow us to accurately separate sections when a user creates a section name with commas in it.
Additional notes: