Section

class canvasapi.section.Section(requester, attributes)
Parameters:
  • requester (canvasapi.requester.Requester) – The requester to pass HTTP requests through.

  • attributes (dict) – The JSON object to build this object with.

cross_list_section(new_course, **kwargs)

Move the Section to another course.

Calls:

POST /api/v1/sections/:id/crosslist/:new_course_id

Parameters:

new_course (canvasapi.course.Course or int) – The object or ID of the new course.

Return type:

canvasapi.section.Section

decross_list_section(**kwargs)

Undo cross-listing of a section.

Calls:

DELETE /api/v1/sections/:id/crosslist

Return type:

canvasapi.section.Section

delete(**kwargs)

Delete a target section.

Calls:

DELETE /api/v1/sections/:id

Return type:

canvasapi.section.Section

edit(**kwargs)

Edit contents of a target section.

Calls:

PUT /api/v1/sections/:id

Return type:

canvasapi.section.Section

enroll_user(user, **kwargs)

Create a new user enrollment for a course or a section.

Calls:

POST /api/v1/section/:section_id/enrollments

Parameters:

user (canvasapi.user.User or int) – The object or ID of the user to enroll in this course.

Return type:

canvasapi.enrollment.Enrollment

get_assignment_override(assignment, **kwargs)

Return override for the specified assignment for this section.

Parameters:

assignment (canvasapi.assignment.Assignment or int) – The assignment to get an override for

Calls:

GET /api/v1/sections/:course_section_id/assignments/:assignment_id/override

Return type:

canvasapi.assignment.AssignmentOverride

get_enrollments(**kwargs)

List all of the enrollments for the current user.

Calls:

GET /api/v1/sections/:section_id/enrollments

Return type:

canvasapi.paginated_list.PaginatedList of canvasapi.enrollment.Enrollment

get_multiple_submissions(**kwargs)

List submissions for multiple assignments. Get all existing submissions for a given set of students and assignments.

Calls:

GET /api/v1/sections/:section_id/students/submissions

Return type:

canvasapi.paginated_list.PaginatedList of canvasapi.submission.Submission

submissions_bulk_update(**kwargs)

Update the grading and comments on multiple student’s assignment submissions in an asynchronous job.

Calls:

POST /api/v1/sections/:section_id/submissions/update_grades

Return type:

canvasapi.progress.Progress