Section name and ID variable substitution ordering
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These two variable substitutions expose section IDs and section names in the LTI 1.3 NRPS response:
- com.instructure.User.sectionNames
- Canvas.course.sectionIds
Used in conjunction, they can sometimes be used to determine which sections the user is in, including the names of those sections, because the two variables come back in the same order. However, sometimes the section names come back in different order for different users in the course.
Does anyone know what determines the order of these two variables? Or some other way to determine the names of the sections each user is in based on the NRPS response? I found this post on the Canvas forums, but the explanation for the ordering didn't make sense to me.
From what I can tell from the Canvas codebase on Github, the IDs have an order by clause, but the query for the names doesn't. Seems like this might be as simple as ordering the names before adding them to the NRPS response in the variable substitution. Without consistent ordering, I'm not seeing a way to accurately retrieve section names using LTI.