.course. gradebookColumn

Source:
Functions for interacting with gradebook columns within courses

Methods

(async) create(optsopt, configopt) → {Promise.<CanvasCustomColumn>}

Source:
Author:
  • Gabe Abrams
Creates a new gradebook column in a course
Parameters:
Name Type Attributes Description
opts object <optional>
object containing all arguments
Properties
Name Type Attributes Default Description
courseId number <optional>
default course id Canvas course Id to query
title string <optional>
Untitled Column Title of new custom gradebook column
position number <optional>
last Position of the gradebook column within the list of custom gradebook columns
hidden boolean <optional>
If truthy, hides the gradebook column from everyone, not just instructor as usual
readOnly boolean <optional>
if truthy, makes column read-only in the Canvas UI
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<CanvasCustomColumn>

(async) delete(opts, configopt) → {Promise.<CanvasCustomColumn>}

Source:
Author:
  • Gabe Abrams
Deletes a gradebook column from a course
Parameters:
Name Type Attributes Description
opts object object containing all arguments
Properties
Name Type Attributes Default Description
columnId number Gradebook column Id
courseId number <optional>
default course id Canvas course Id to query
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<CanvasCustomColumn>

(async) get(opts, configopt) → {Promise.<CanvasCustomColumn>}

Source:
Author:
  • Gabe Abrams
Gets info on a specific gradebook column in a course. This is a simulated endpoint: it does not exist. We are just pulling the list of columns and returning one element.
Parameters:
Name Type Attributes Description
opts object object containing all arguments
Properties
Name Type Attributes Default Description
columnId number Canvas column Id to return
courseId number <optional>
default course id Canvas course Id to query
isHidden boolean <optional>
Must be set to true if the column you're retrieving is a hidden column.
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<CanvasCustomColumn>

(async) list(optsopt, configopt) → {Promise.<Array.<CanvasCustomColumn>>}

Source:
Author:
  • Gabe Abrams
Gets the list of custom gradebook columns in a course
Parameters:
Name Type Attributes Description
opts object <optional>
object containing all arguments
Properties
Name Type Attributes Description
courseId number <optional>
Canvas course Id to query
includeHidden boolean <optional>
If truthy, includes hidden gradebook columns as well.
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<Array.<CanvasCustomColumn>>

(async) listEntries(opts, configopt) → {Promise.<Array.<CanvasColumnDatum>>}

Source:
Author:
  • Gabe Abrams
Gets the list of entries in a specific gradebook column in a course
Parameters:
Name Type Attributes Description
opts object object containing all arguments
Properties
Name Type Attributes Default Description
columnId number Gradebook column Id
courseId number <optional>
default course id Canvas course Id to query
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<Array.<CanvasColumnDatum>>

(async) update(opts, configopt) → {Promise.<CanvasCustomColumn>}

Source:
Author:
  • Gabe Abrams
Updates a gradebook column's information
Parameters:
Name Type Attributes Description
opts object object containing all arguments
Properties
Name Type Attributes Default Description
columnId number Canvas custom gradebook column ID to query
courseId number <optional>
default course id Canvas course ID
title string <optional>
current value New title for the column
position number <optional>
current value New position for the column in the list of custom gradebook columns
hidden boolean <optional>
current value If set, updates whether the custom gradebook column is hidden from everyone. Must be a boolean
readOnly boolean <optional>
current value if set, updates whether the custom gradebook column is read-only in the UI
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<CanvasCustomColumn>

(async) updateEntries(opts, configopt) → {Promise.<CanvasProgress>}

Source:
Author:
  • Gabe Abrams
Update the list of entries in a specific gradebook column in a course
Parameters:
Name Type Attributes Description
opts object object containing all arguments
Properties
Name Type Attributes Default Description
columnId number Gradebook column Id
entries Array.<CanvasColumnDatum> list of ColumnDatum objects: `[{user_id: , content: }, ...]`
courseId number <optional>
default course id Canvas course Id to query
waitForCompletion boolean <optional>
If truthy, waits for completion of batch update request
waitForCompletionTimeout number <optional>
2 Number of minutes to wait for completion of batch upload
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<CanvasProgress>

(async) updateEntry(opts, configopt) → {Promise.<CanvasColumnDatum>}

Source:
Author:
  • Gabe Abrams
Update a specific entry in a gradebook column
Parameters:
Name Type Attributes Description
opts object object containing all arguments
Properties
Name Type Attributes Default Description
columnId number Gradebook column Id
studentId number Canvas user id to update
content string the new text for the user's column cell
courseId number <optional>
default course id Canvas course Id to query
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<CanvasColumnDatum>