Import a problem from another course
POST/api/courses/:id/problems/import
Imports a problem from ANOTHER course the caller can manage into this course. The title/description come from the request; the type, state cap, determinism flag, and the solution file (answer key) are copied from the source. The solution file is copied to a fresh name on disk so the two problems never share a file. Permission is tiered: the wrapper gates the destination course (manage), and the caller must also be able to manage the source course.
Request
Responses
- 201
- 400
- 403
- 404
- 500
The newly created problem.
Invalid body, or the source is the destination course.
Caller cannot manage the destination or the source course.
Source problem not found in the source course.
Server error.