Hello,
I'm attempting to 'drop' students from courses through the Canvas API. Currently when I run my drop php code the student is marked as 'Completed' but I would like to set the student as 'Inactive'.
I'm trying to follow the documentation for Conclude, deactivate, or delete an enrollment and pass the inactivate task. I believe the GUI option for this is 'Deactivate'.
Enrollments - Canvas LMS REST API Documentation
-------------------------------
$response = $client->request('DELETE', 'api/v1/courses/'.$course_id.'/enrollments/'.$enrollment_id ,
[
'headers' => $headers,
'body' => json_encode($enroll_array),
]);
I'm not sure i'm reading the Docs correctly on how to provide the 'task' for this endpoint. The json body looks like this:
"["inactivate"]"
Thank you for your assistance!
Jeremiah Ellington
Holy Names University