Publish or unpublish a course
PATCH/api/courses/:id/publish
Toggles a course's published state. Course staff (faculty or TA) or a system admin. Unpublishing runs a safety check (canUnpublishCourse) that refuses if students would lose access to work already in progress.
Request
Responses
- 200
- 400
- 401
- 403
- 500
The updated course (id, name, code, isPublished, updatedAt).
isPublished must be a boolean.
Not signed in.
Not course staff or a system admin, or unpublishing is blocked by the safety check.
Server error.