- Source:
Functions for interacting with assignments within courses
Methods
(async) create(optsopt, configopt) → {Promise.<CanvasAssignment>}
- Source:
Creates a Canvas assignment
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
object containing all arguments
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas Assignment https://canvas.instructure.com/doc/api/assignments.html#Assignment
- Type
- Promise.<CanvasAssignment>
(async) createOverride(opts, configopt) → {Promise.<CanvasAssignmentOverride>}
- Source:
Create assignment override. Note that if any dates (dueAt, unlockAt, or
lockAt) are left out, they will be set to "none" for the target(s) of this
override. If dueAt is omitted, the target(s) will have no deadline. If
unlockAt is omitted, the target(s) will immediately be able to see the
assignment (even if everyone else has to wait until the unlockAt date). If
lockAt is omitted, the target(s) will be able to submit at any
time in the future (even if everyone else can't submit because their lock
date has passed). In short, it is not recommended to omit dates that are
defined in the assignment.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas AssignmentOverride https://canvas.instructure.com/doc/api/assignments.html#AssignmentOverride
- Type
- Promise.<CanvasAssignmentOverride>
(async) createSubmissionComment(opts, configopt) → {Promise.<CanvasSubmission>}
- Source:
Adds a comment to a submission
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
||||||||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas submission https://canvas.instructure.com/doc/api/submissions.html#Submission
- Type
- Promise.<CanvasSubmission>
(async) createTextSubmission(opts, configopt) → {Promise.<CanvasSubmission>}
- Source:
Creates a text submission on behalf of the current user
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
||||||||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas submission https://canvas.instructure.com/doc/api/submissions.html#Submission
- Type
- Promise.<CanvasSubmission>
(async) createURLSubmission(opts, configopt) → {Promise.<CanvasSubmission>}
- Source:
Creates a url submission on behalf of the current user
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
||||||||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas submission https://canvas.instructure.com/doc/api/submissions.html#Submission
- Type
- Promise.<CanvasSubmission>
(async) delete(opts, configopt) → {Promise.<CanvasAssignment>}
- Source:
Delete an assignment
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas Assignment https://canvas.instructure.com/doc/api/assignments.html#Assignment
- Type
- Promise.<CanvasAssignment>
(async) deleteOverride(opts, configopt) → {Promise.<CanvasAssignmentOverride>}
- Source:
Deletes an assignment override
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
|||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas AssignmentOverride https://canvas.instructure.com/doc/api/assignments.html#AssignmentOverride
- Type
- Promise.<CanvasAssignmentOverride>
(async) get(opts, configopt) → {Promise.<CanvasAssignment>}
- Source:
Get info on a specific assignment in a course
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
|||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas Assignment https://canvas.instructure.com/doc/api/assignments.html#Assignment
- Type
- Promise.<CanvasAssignment>
(async) getOverride(opts, configopt) → {Promise.<CanvasAssignmentOverride>}
- Source:
Get a specific override on an assignment in a course
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
|||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas AssignmentOverride https://canvas.instructure.com/doc/api/assignments.html#AssignmentOverride
- Type
- Promise.<CanvasAssignmentOverride>
(async) getSubmission(opts, configopt) → {Promise.<CanvasSubmission>}
- Source:
Gets a single submission for an assignment
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
||||||||||||||||||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas submission https://canvas.instructure.com/doc/api/submissions.html#Submission
- Type
- Promise.<CanvasSubmission>
(async) list(optsopt, configopt) → {Promise.<Array.<CanvasAssignment>>}
- Source:
Lists the assignments in a course
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
object containing all arguments
Properties
|
|||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
list of Canvas Assignments https://canvas.instructure.com/doc/api/assignments.html#Assignment
- Type
- Promise.<Array.<CanvasAssignment>>
(async) listAllSubmissions(optsopt, configopt) → {Promise.<Array.<CanvasSubmission>>}
- Source:
Lists the submissions for a batch of assignment/students in a course
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
object containing all arguments
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
list of submissions https://canvas.instructure.com/doc/api/submissions.html#Submission
- Type
- Promise.<Array.<CanvasSubmission>>
(async) listGradeableStudents(opts, configopt) → {Promise.<Array.<CanvasUser>>}
- Source:
List gradeable students for a specific assignment
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
list of Canvas users https://canvas.instructure.com/doc/api/users.html#User
- Type
- Promise.<Array.<CanvasUser>>
(async) listOverrides(opts, configopt) → {Promise.<Array.<CanvasAssignmentOverride>>}
- Source:
Gets the list of overrides for an assignment
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
list of Canvas AssignmentOverrides https://canvas.instructure.com/doc/api/assignments.html#AssignmentOverride
- Type
- Promise.<Array.<CanvasAssignmentOverride>>
(async) listSubmissions(opts, configopt) → {Promise.<Array.<CanvasSubmission>>}
- Source:
Lists the submissions to a specific assignment in a course. If the assignment
has anonymous grading turned on, to exclude the test user, we will also
pull the list of students in the course. If including the user object for
an anonymously graded assignment, fake user objects will be created where
each submissions[i].user object contains a isAnonymousUser boolean that is
true
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
||||||||||||||||||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
list of Canvas submissions https://canvas.instructure.com/doc/api/submissions.html#Submission
- Type
- Promise.<Array.<CanvasSubmission>>
(async) update(opts, configopt) → {Promise.<CanvasAssignment>}
- Source:
Updates a Canvas assignment
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas Assignment https://canvas.instructure.com/doc/api/assignments.html#Assignment
- Type
- Promise.<CanvasAssignment>
(async) updateGrade(opts, configopt) → {Promise.<CanvasSubmission>}
- Source:
Updates a student's grade and/or comment
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
|||||||||||||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas submission https://canvas.instructure.com/doc/api/submissions.html#Submission
- Type
- Promise.<CanvasSubmission>
(async) updateGrades(opts, configopt) → {Promise.<CanvasProgress>}
- Source:
Batch updates grades and/or comments. Also supports updating rubric items
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
||||||||||||||||||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas Progress object https://canvas.instructure.com/doc/api/progress.html#Progress
- Type
- Promise.<CanvasProgress>
(async) updateOverride(opts, configopt) → {Promise.<CanvasAssignmentOverride>}
- Source:
Update an assignment override. Note: target can only be updated if the
override is a student override (if this is a group or section override,
the target remains unchanged).
Also, note that if any dates (dueAt, unlockAt, or lockAt) are omitted,
their previous override values will be changed to "none." For instance,
if the previous override has a dueAt and the update does not, the updated
override will have no dueAt date (the target(s) of the override will have
no deadline).
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | object containing all arguments
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||
config |
APIConfig |
<optional> |
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized) |
Returns:
Canvas AssignmentOverride https://canvas.instructure.com/doc/api/assignments.html#AssignmentOverride
- Type
- Promise.<CanvasAssignmentOverride>