class canvasapi.enrollment.Enrollment(requester, attributes)
  • requester (canvasapi.requester.Requester) – The requester to pass HTTP requests through.
  • attributes (dict) – The JSON object to build this object with.
deactivate(task, **kwargs)

Delete, conclude, or deactivate an enrollment.

The following tasks can be performed on an enrollment: conclude, delete, inactivate, deactivate.

Calls:DELETE /api/v1/courses/:course_id/enrollments/:id
Parameters:task (str) – The task to perform on the enrollment.
Return type:canvasapi.enrollment.Enrollment

Activate an inactive enrollment.

Calls:PUT /api/v1/courses/:course_id/enrollments/:id/reactivate
Return type:canvasapi.enrollment.Enrollment