API Equivalent to GUI "Edit Sections" for Course Extensions?

Jump to solution
reynlds
Community Participant

I'm writing a course extension process and am stuck at this step. Currently the way we extend courses beyond course/term dates is through the GUI in this manner (luckily they are few and far between):

- create a new section in the course and assign the new end date to it
- check the box that limits student access
- navigate to the People course link
- find the student select the "kebob" (three dots) menu to "Edit Sections"
- select the new, available section in the search
- add teachers to the new section in the same manner

I've got everything configured to run this through the Canvas API, but cannot find an equivalent method to the "Edit Sections" in the GUI. Otherwise attempting to add an enrollment to a course that is beyond course/term dates results in an error:

{'message': "Can't add an enrollment to a concluded course."}

I could work around it by preparing an SIS upload file with the single enrollment, but am interested in keeping this integration out of the SIS processes and more accurately reflect the GUI activities.

Labels (3)
0 Likes
1 Solution
reynlds
Community Participant
Author

I got this working by following this process:

  • create new section and apply extended course availability date(s) to it
  • enroll the student in the new section
  • enroll all course teachers in the new section

I also got this "automated" using the script found here:  https://github.com/reynlds-illinois/enterprise_learning_systems/blob/main/canvas/canvas_extend_cours...

 

View solution in original post