Leading through Chaos - Insights and Actions • Browse the resources from the keynote presented by the Academic Strategy Team.
Found this content helpful? Log in or sign up to leave a like!
Is there an API to find cross-listed sections of the original course?
When we make a call to "/api/v1/courses/{courseId}?include[]=sections" it returns only the current sections that the course has. Not the ones tied to itself initially and then cross-listed to another course.
The section itself knows the original course that it is originally part of(nonxlist_course_id). However, I am more curious about whether is there a way the original course can know that.
If I need to explain it with an example; say there is course A and B and course A has a section named X. When we cross-list section X to course B, course A lose track of section X. From now on, only section X knows that it was originally part of the course A. I need to know if course A can know that section X was part of course A initially.
I'd love to hear if anyone has an alternative to how I'm addressing this in my code, which is generating a xlist provisioning report and processing the returned CSV.
Have you tried the sections api call? It returns the course that the section is currently listed in:
https://canvas.instructure.com/doc/api/sections.html
Hi @agschmid
I have tried the sections api call. As mentioned above the section itself knows the original course that it is originally part of. nonxlist_course_id holds that information when we make a call to the sections api. However, I am more curious about whether is there a way the original course can know that the section was part of itself initially and then cross-listed to another course.
Here's an excerpt of a xlist provisioning report:
This shows that the last three courses have been crosslisted. nonxlist_course_id shows the original course, while xlist_course_id shows the course to which it's been crosslisted.
@aydineylem , agree, I don't see a better way. I looked at tables in Canvas Data 2 without success. I ran into a similar problem today where on button click I want to retrieve a current Canvas course grade for 1 student. My code knows what course and section the student is enrolled in from my in-house SIS and makes API call for the course grade, but if the student's section was cross-listed into another Canvas course shell I don't then have an API call to walk the cross-listing forward to find student's grade. Getting all the student's current term grades with the Enrollments API and filtering seems to be my best approach.
To interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in