public interface CourseWriter extends CanvasWriter<Course,CourseWriter>
| Modifier and Type | Method and Description |
|---|---|
Optional<Progress> |
batchUpdateCourseState(String accountId,
Course.CourseEvent event,
String... courseIds)
Change the workflow state of multiple courses at once
This operation happens asynchronously and returns a Progress object to monitor its execution.
|
Optional<Course> |
createCourse(String accountId,
Course course)
Create a new course in Canvas
|
Boolean |
deleteCourse(DeleteCourseOptions options)
Delete or conclude a course in Canvas.
|
Boolean |
deleteCourse(String courseId) |
Optional<Course> |
updateCourse(Course course)
Update a course in Canvas
|
Optional<Course> |
updateCourse(String id,
Course course)
Update a course in Canvas
|
Optional<Deposit> |
uploadFile(String courseId,
UploadOptions options)
Start a file upload to a course.
|
writeAsCanvasUser, writeAsSisUserOptional<Course> createCourse(String accountId, Course course) throws IOException
accountId - the account ID of the account under which to place this coursecourse - A course object containing the information needed to create a course in CanvasIOException - When there is an error communicating with CanvasOptional<Course> updateCourse(Course course) throws IOException
course - A course object containing the information needed to update a course in CanvasIOException - When there is an error communicating with CanvasOptional<Course> updateCourse(String id, Course course) throws IOException
id - The ID of the course to update, this is useful when you want to update a course
by it's SIS ID, for example with "sis_course_id:id-123"course - A course object containing the information needed to update a course in CanvasIOException - When there is an error communicating with CanvasBoolean deleteCourse(String courseId) throws IOException
courseId - The ID of the course you wish to deleteIOException - When there is an error communicating with CanvasBoolean deleteCourse(DeleteCourseOptions options) throws IOException
options - (specifying the ID and whether to delete or conclude the course)IOException - When there is an error communicating with CanvasOptional<Deposit> uploadFile(String courseId, UploadOptions options) throws IOException
courseId - The id of the course where the file upload will be doneoptions - Upload file configurationIOException - When there is an error communicating with CanvasOptional<Progress> batchUpdateCourseState(String accountId, Course.CourseEvent event, String... courseIds) throws IOException
accountId - The ID of the account in which to perform this bulk operationevent - The course event type to pushcourseIds - A list of course IDs to perform this operation onIOException - When there is an error communicating with CanvasCopyright © 2021 Kansas State University, Office of Mediated Education. All rights reserved.