Assignment Groups API
API for accessing Assignment Group and Assignment information.
An Assignment Group object looks like:
{
// the id of the Assignment Group
id: 1,
// the name of the Assignment Group
name: "group2",
// the position of the Assignment Group
position: 7,
// the weight of the Assignment Group
group_weight: 20,
// the assignments in this Assignment Group
// (see the Assignment API for a detailed list of fields)
assingments: { ... },
// the grading rules that this Assignment Group has
rules: {
"drop_lowest" => 1,
"drop_highest" => 1,
"never_drop" => [33,17,24]
}
}
List assignment groups AssignmentGroupsController#index
GET /api/v1/courses/:course_id/assignment_groups
Returns the list of assignment groups for the current context. The returned groups are sorted by their position field.
"discussion_topic" is only valid if "assignments" is also included
Request Parameters:
-
include[]
- "assignments","discussion_topic"
-
Associations to include with the group.
-
override_assignment_dates
- Optional, Boolean
-
Apply assignment overrides for each assignment, defaults to true.
Get an Assignment Group AssignmentGroupsApiController#show
GET /api/v1/courses/:course_id/assignment_groups/:assignment_group_id
Returns the assignment group with the given id.
Request Parameters:
-
include[]
- "assignments","discussion_topic"
-
Associations to include with the group. "discussion_topic" is only valid if "assignments" is also included
-
override_assignment_dates
- Optional, Boolean
-
Apply assignment overrides for each assignment, defaults to true.
Create an Assignment Group AssignmentGroupsApiController#create
POST /api/v1/courses/:course_id/assignment_groups
Create a new assignment group for this course.
Request Parameters:
-
name
- Optional, String
-
The assignment group's name
-
position
- Optional, Integer
-
The position of this assignment group in relation to the other assignment groups
-
group_weight
- Optional, Float
-
The percent of the total grade that this assignment group represents
-
rules
- Optional
-
The grading rules that are applied within this assignment group See the Assignment Group object definition for format
Edit an Assignment Group AssignmentGroupsApiController#update
PUT /api/v1/courses/:course_id/assignment_groups/:assignment_group_id
Modify an existing Assignment Group. Accepts the same parameters as Assignment Group creation
Returns a Assignment GroupDestroy an Assignment Group AssignmentGroupsApiController#destroy
DELETE /api/v1/courses/:course_id/assignment_groups/:assignment_group_id
Deletes the assignment group with the given id.
Request Parameters:
-
move_assignment_to
The ID of an active Assignment Group to which the assignments that are currently assigned to the destroyed Assignment Group will be assigned NOTE: If this argument is not provided, any assignments in this Assignment Group will be deleted