@@ -140,11 +140,16 @@ return `Course` object
140140Course = {
141141 id: string,
142142 name: string,
143+ description?: string,
143144 modules: Module[],
144145 assignments: Assignment[],
145146 creationDate: Date,
146- archivedDate?: Date,
147- archived: boolen
147+ archivedDate: Date,
148+ archived: boolean,
149+ start?: Date,
150+ end?: Date,
151+ timezone?: string,
152+ tags?: string[]
148153}
149154Module = {
150155 id: string,
@@ -169,8 +174,16 @@ return `Course` object
169174Course = {
170175 id: string,
171176 name: string,
177+ description?: string,
172178 modules: Module[],
173- assignments: Assignment[]
179+ assignments: Assignment[],
180+ creationDate: Date,
181+ archivedDate: Date,
182+ archived: boolean,
183+ start?: Date,
184+ end?: Date,
185+ timezone?: string,
186+ tags?: string[]
174187}
175188Module = {
176189 id: string,
@@ -271,6 +284,71 @@ Fetch course teachers
271284```
272285returns user ` User[] ` object
273286
287+ Add teacher to course
288+
289+ ```
290+ await codio.v1.course.addTeacher(courseId, userId, readOnly?)
291+ ```
292+ - ` readOnly ` (optional, default ` false ` ): when ` true ` , the user is added as a read‑only teacher.
293+ - returns ` boolean ` — true if the teacher was successfully added
294+
295+ Example:
296+ ``` javascript
297+ // Add full teacher (default)
298+ await codio .v1 .course .addTeacher (courseId, userId)
299+
300+ // Add read-only teacher
301+ await codio .v1 .course .addTeacher (courseId, userId, true )
302+ ```
303+
304+ #### Course management
305+
306+ Create course
307+
308+ ```
309+ await codio.v1.course.createCourse(courseData)
310+ ```
311+ Parameters:
312+ ```
313+ CreateCourseRequest = {
314+ name: string,
315+ description?: string,
316+ start?: string,
317+ end?: string,
318+ timezone?: string,
319+ tags?: string[]
320+ }
321+ ```
322+ Notes:
323+ - ` start ` and ` end ` are ISO 8601 strings (e.g., ` 2025-09-01T13:00:00Z ` ).
324+ - ` timezone ` should be an IANA timezone name (e.g., ` America/New_York ` ).
325+ - In responses, ` Course.start ` is a ` Date ` (or absent), while ` CreateCourseRequest.start ` is a string.
326+ returns ` string ` — newly created courseId
327+
328+ Example:
329+ ``` javascript
330+ const courseId = await codio .v1 .course .createCourse ({
331+ name: ' Intro to CS' ,
332+ description: ' Fall 2025 section' ,
333+ start: ' 2025-09-01T13:00:00Z' , // ISO 8601 string
334+ end: ' 2025-12-20T23:59:59Z' , // ISO 8601 string
335+ timezone: ' America/New_York' ,
336+ tags: [' CS101' ,' Fall-2025' ]
337+ })
338+ ```
339+
340+ Create module
341+
342+ ```
343+ await codio.v1.course.createModule(courseId, moduleName)
344+ ```
345+ returns ` string ` — newly created moduleId
346+
347+ Example:
348+ ``` javascript
349+ const moduleId = await codio .v1 .course .createModule (courseId, ' Module 1: Basics' )
350+ ```
351+
274352
275353#### Export student CSV
276354
@@ -509,7 +587,7 @@ returns `AssignmentSettings` - Settings, missed properties won't be updated
509587 const settings = await codio .assignment .getSettings (' <course>' , ' <assignments>' )
510588```
511589
512- ``` javascript
590+ ```
513591 enableResetAssignmentByStudent?: boolean
514592 disableDownloadByStudent?: boolean
515593 visibilityOnDisabled?: string, // "READ_ONLY", "NO_ACCESS",
@@ -575,7 +653,7 @@ Set time limits on a per-student basis
575653
576654``` javascript
577655 await codio .assignment .updateStudentTimeExtension (courseId, assignmentId, studentId, {
578- extendedDeadline: minutes
656+ extendedDeadline: minutes,
579657 extendedTimeLimit: minutes
580658})
581659```
0 commit comments