.course. assignmentGroup

Source:
Functions for interacting with assignment groups within courses

Methods

(async) create(opts, configopt) → {Promise.<CanvasAssignmentGroup>}

Source:
Author:
  • Gabe Abrams
Create a new assignment group in a course
Parameters:
Name Type Attributes Description
opts object object containing all arguments
Properties
Name Type Attributes Default Description
name string New assignment group name
courseId number <optional>
default course id Canvas course Id to query
weight number <optional>
0 Assignment group weight
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<CanvasAssignmentGroup>

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

Source:
Author:
  • Gabe Abrams
Deletes an assignment group from a course
Parameters:
Name Type Attributes Description
opts object object containing all arguments
Properties
Name Type Attributes Default Description
assignmentGroupId number Assignment group to delete
courseId number <optional>
default course id Canvas course Id to query
moveAssignmentsTo number <optional>
Assignment group to move assignments to. If this parameter isn't included, assignments in the assignment group will be deleted.
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<CanvasAssignmentGroup>

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

Source:
Author:
  • Gabe Abrams
Gets info on a specific assignment group in a course
Parameters:
Name Type Attributes Description
opts object object containing all arguments
Properties
Name Type Attributes Default Description
assignmentGroupId number Assignment group to get
courseId number <optional>
default course id Canvas course Id to query
includeAssignments boolean <optional>
if true, the list of assignments inside the group is included
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<CanvasAssignmentGroup>

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

Source:
Author:
  • Gabe Abrams
Lists assignment groups 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
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<Array.<CanvasAssignmentGroup>>

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

Source:
Author:
  • Gabe Abrams
Updates an assignment group in a course
Parameters:
Name Type Attributes Description
opts object object containing all arguments
Properties
Name Type Attributes Default Description
assignmentGroupId number Assignment group to update
courseId number <optional>
default course id Canvas course Id to query
name string <optional>
current value New assignment group name
weight number <optional>
current value New weight
dropLowest number <optional>
0 number of lowest assignment scores to drop
dropHighest number <optional>
0 number of highest assignment scores to drop
neverDrop Array.<number> <optional>
list of assignment ids to not drop in the drop lowest/highest rule
config APIConfig <optional>
custom configuration for this specific endpoint call (overwrites defaults that were included when api was initialized)
Returns:
Type
Promise.<CanvasAssignmentGroup>