Delete course
course_deleteDelete a course from this site. If other sites share the course it is only detached from this one and nothing is deleted. Otherwise it is permanently deleted with its content versions, enrollments, learner progress, issued certificates, discussions, payment records (they drop out of purchase history and revenue reports), applications, learning-path steps and group course links, which cannot be undone; while it has enrolled (non-waitlisted) learners the call is refused unless force:true. To hide a course but keep everything, set isVisibleInCatalog:false with course_update instead. Returns whether the course was deleted or detached. Check who is enrolled with enrollment_list (courseId) before forcing a delete.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Course id. | |
| force | No | Delete even if the course has enrolled learners, removing their enrollments, progress, certificates and payment records too. Default false. |