Duplicate a course
POST/api/courses/:id/duplicate
Creates a new course modeled on an existing one, in a single transaction. The copy's faculty comes from the copied faculty roster and/or an explicit instructorIds list; at least one faculty member is required (the caller is NOT added automatically). TAs are copied only when asked. copyMode (or the legacy copyAssignments/copyProblems booleans) selects what carries over: assignments only, problems only, or assignments with their problems. The copy always starts unpublished with a fresh registration code. System administrators only. Dates are interpreted in the actor's timezone.
Request
Responses
- 201
- 400
- 401
- 403
- 500
The new course id.
Missing fields, bad credits, bad code, invalid dates, or no faculty for the copy.
Not signed in.
System administrators only (logged as a security event).
Server error.