assignments
Creates, updates, deletes, gets or lists an assignments resource.
Overview
| Name | assignments |
| Type | Resource |
| Id | github.classroom.assignments |
Fields
The following fields are returned by SELECT queries:
- get_an_assignment
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | Unique identifier of the repository. |
accepted | integer | The number of students that have accepted the assignment. |
classroom | object | A GitHub Classroom classroom (title: Classroom) |
deadline | string (date-time) | The time at which the assignment is due. (example: 2011-01-26T19:06:43Z) |
editor | string | The selected editor for the assignment. (example: codespaces) |
feedback_pull_requests_enabled | boolean | Whether feedback pull request will be created when a student accepts the assignment. |
invitations_enabled | boolean | Whether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment. |
invite_link | string | The link that a student can use to accept the assignment. (example: https://classroom.github.com/a/Lx7jiUgx) |
language | string | The programming language used in the assignment. (example: elixir) |
max_members | integer | The maximum allowable members per team. |
max_teams | integer | The maximum allowable teams for the assignment. |
passing | integer | The number of students that have passed the assignment. |
public_repo | boolean | Whether an accepted assignment creates a public repository. |
slug | string | Sluggified name of the assignment. (example: intro-to-binaries) |
starter_code_repository | object | A GitHub repository view for Classroom (title: Simple Classroom Repository) |
students_are_repo_admins | boolean | Whether students are admins on created repository when a student accepts the assignment. |
submitted | integer | The number of students that have submitted the assignment. |
title | string | Assignment title. (example: Intro to Binaries) |
type | string | Whether it's a group assignment or individual assignment. (individual, group) (example: individual) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_an_assignment | select | assignment_id | Gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
assignment_id | integer | The unique identifier of the classroom assignment. |
SELECT examples
- get_an_assignment
Gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.
SELECT
id,
accepted,
classroom,
deadline,
editor,
feedback_pull_requests_enabled,
invitations_enabled,
invite_link,
language,
max_members,
max_teams,
passing,
public_repo,
slug,
starter_code_repository,
students_are_repo_admins,
submitted,
title,
type
FROM github.classroom.assignments
WHERE assignment_id = '{{ assignment_id }}' -- required
;