Skip to main content

classroom_assignments

Creates, updates, deletes, gets or lists a classroom_assignments resource.

Overview

Nameclassroom_assignments
TypeResource
Idgithub.classroom.classroom_assignments

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idintegerUnique identifier of the repository.
acceptedintegerThe number of students that have accepted the assignment.
classroomobjectA GitHub Classroom classroom (title: Simple Classroom)
deadlinestring (date-time)The time at which the assignment is due. (example: 2011-01-26T19:06:43Z)
editorstringThe selected editor for the assignment. (example: codespaces)
feedback_pull_requests_enabledbooleanWhether feedback pull request will be created on assignment acceptance.
invitations_enabledbooleanWhether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment.
invite_linkstringThe link that a student can use to accept the assignment. (example: https://classroom.github.com/a/Lx7jiUgx)
languagestringThe programming language used in the assignment. (example: elixir)
max_membersintegerThe maximum allowable members per team.
max_teamsintegerThe maximum allowable teams for the assignment.
passingintegerThe number of students that have passed the assignment.
public_repobooleanWhether an accepted assignment creates a public repository.
slugstringSluggified name of the assignment. (example: intro-to-binaries)
students_are_repo_adminsbooleanWhether students are admins on created repository on accepted assignment.
submittedintegerThe number of students that have submitted the assignment.
titlestringAssignment title. (example: Intro to Binaries)
typestringWhether it's a Group Assignment or Individual Assignment. (individual, group) (example: individual)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_assignments_for_a_classroomselectclassroom_idpage, per_pageLists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom.

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.

NameDatatypeDescription
classroom_idintegerThe unique identifier of the classroom.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

Lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom.

SELECT
id,
accepted,
classroom,
deadline,
editor,
feedback_pull_requests_enabled,
invitations_enabled,
invite_link,
language,
max_members,
max_teams,
passing,
public_repo,
slug,
students_are_repo_admins,
submitted,
title,
type
FROM github.classroom.classroom_assignments
WHERE classroom_id = '{{ classroom_id }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
;