REST Resource: courses.courseWork.studentSubmissions

Resource: StudentSubmission

Student submission for course work.

StudentSubmission items are generated when a CourseWork item is created.

StudentSubmissions that have never been accessed (i.e. with state = NEW) may not have a creation time or update time.

JSON representation
{
  "courseId": string,
  "courseWorkId": string,
  "id": string,
  "userId": string,
  "creationTime": string,
  "updateTime": string,
  "state": enum(SubmissionState),
  "late": boolean,
  "draftGrade": number,
  "assignedGrade": number,
  "alternateLink": string,
  "courseWorkType": enum(CourseWorkType),
  "associatedWithDeveloper": boolean,
  "submissionHistory": [
    {
      object(SubmissionHistory)
    }
  ],

  // Union field content can be only one of the following:
  "assignmentSubmission": {
    object(AssignmentSubmission)
  },
  "shortAnswerSubmission": {
    object(ShortAnswerSubmission)
  },
  "multipleChoiceSubmission": {
    object(MultipleChoiceSubmission)
  },
  // End of list of possible types for union field content.
}
Fields
courseId

string

Identifier of the course.

Read-only.

courseWorkId

string

Identifier for the course work this corresponds to.

Read-only.

id

string

Classroom-assigned Identifier for the student submission. This is unique among submissions for the relevant course work.

Read-only.

userId

string

Identifier for the student that owns this submission.

Read-only.

creationTime

string (Timestamp format)

Creation time of this submission. This may be unset if the student has not accessed this item.

Read-only.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Last update time of this submission. This may be unset if the student has not accessed this item.

Read-only.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

state

enum(SubmissionState)

State of this submission.

Read-only.

late

boolean

Whether this submission is late.

Read-only.

draftGrade

number

Optional pending grade. If unset, no grade was set. This value must be non-negative. Decimal (i.e. non-integer) values are allowed, but will be rounded to two decimal places.

This is only visible to and modifiable by course teachers.

assignedGrade

number

Optional grade. If unset, no grade was set. This value must be non-negative. Decimal (i.e. non-integer) values are allowed, but will be rounded to two decimal places.

This may be modified only by course teachers.

courseWorkType

enum(CourseWorkType)

Type of course work this submission is for.

Read-only.

associatedWithDeveloper

boolean

Whether this student submission is associated with the Developer Console project making the request.

See [google.classroom.Work.CreateCourseWork][courseWork.create] for more details.

Read-only.

submissionHistory[]

object(SubmissionHistory)

The history of the submission (includes state and grade histories).

Read-only.

Union field content. Submission content. The specific type depends on the value of course_work_type. content can be only one of the following:
assignmentSubmission

object(AssignmentSubmission)

Submission content when courseWorkType is ASSIGNMENT.

Students can modify this content using [google.classroom.Work.ModifyAttachments][studentSubmissions.modifyAttachments].

shortAnswerSubmission

object(ShortAnswerSubmission)

Submission content when courseWorkType is SHORT_ANSWER_QUESTION.

multipleChoiceSubmission

object(MultipleChoiceSubmission)

Submission content when courseWorkType is MULTIPLE_CHOICE_QUESTION.

SubmissionState

Possible states of student submissions.

Enums
SUBMISSION_STATE_UNSPECIFIED No state specified. This should never be returned.
NEW The student has never accessed this submission. Attachments are not returned and timestamps is not set.
CREATED Has been created.
TURNED_IN Has been turned in to the teacher.
RETURNED Has been returned to the student.
RECLAIMED_BY_STUDENT Student chose to "unsubmit" the assignment.

AssignmentSubmission

Student work for an assignment.

JSON representation
{
  "attachments": [
    {
      object(Attachment)
    }
  ],
}
Fields
attachments[]

object(Attachment)

Attachments added by the student. Drive files that correspond to materials with a share mode of STUDENT_COPY may not exist yet if the student has not accessed the assignment in Classroom.

Some attachment metadata is only populated if the requesting user has permission to access it. Identifier and alternateLink fields are always available, but others (e.g. title) may not be.

Attachment

Attachment added to student assignment work.

When creating attachments, setting the form field is not supported.

JSON representation
{

  // Union field attachment can be only one of the following:
  "driveFile": {
    object(DriveFile)
  },
  "youTubeVideo": {
    object(YouTubeVideo)
  },
  "link": {
    object(Link)
  },
  "form": {
    object(Form)
  },
  // End of list of possible types for union field attachment.
}
Fields
Union field attachment. Attachment data. attachment can be only one of the following:
driveFile

object(DriveFile)

Google Drive file attachment.

youTubeVideo

object(YouTubeVideo)

Youtube video attachment.

form

object(Form)

Google Forms attachment.

ShortAnswerSubmission

Student work for a short answer question.

JSON representation
{
  "answer": string,
}
Fields
answer

string

Student response to a short-answer question.

MultipleChoiceSubmission

Student work for a multiple-choice question.

JSON representation
{
  "answer": string,
}
Fields
answer

string

Student's select choice.

SubmissionHistory

The history of the submission. This currently includes state and grade histories.

JSON representation
{

  // Union field type can be only one of the following:
  "stateHistory": {
    object(StateHistory)
  },
  "gradeHistory": {
    object(GradeHistory)
  },
  // End of list of possible types for union field type.
}
Fields

Union field type.

type can be only one of the following:

stateHistory

object(StateHistory)

The state history information of the submission, if present.

gradeHistory

object(GradeHistory)

The grade history information of the submission, if present.

StateHistory

The history of each state this submission has been in.

JSON representation
{
  "state": enum(State),
  "stateTimestamp": string,
  "actorUserId": string,
}
Fields
state

enum(State)

The workflow pipeline stage.

stateTimestamp

string (Timestamp format)

When the submission entered this state.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

actorUserId

string

The teacher or student who made the change

State

Possible states for a submission to be in.

Enums
STATE_UNSPECIFIED No state specified. This should never be returned.
CREATED The Submission has been created.
TURNED_IN The student has turned in an assigned document, which may or may not be a template.
RETURNED The teacher has returned the assigned document to the student.
RECLAIMED_BY_STUDENT The student turned in the assigned document, and then chose to "unsubmit" the assignment, giving the student control again as the owner.
STUDENT_EDITED_AFTER_TURN_IN The student edited their submission after turning it in. Currently, only used by Questions, when the student edits their answer.

GradeHistory

The history of each grade on this submission.

JSON representation
{
  "pointsEarned": number,
  "maxPoints": number,
  "gradeTimestamp": string,
  "actorUserId": string,
  "gradeChangeType": enum(GradeChangeType),
}
Fields
pointsEarned

number

The numerator of the grade at this time in the submission grade history.

maxPoints

number

The denominator of the grade at this time in the submission grade history.

gradeTimestamp

string (Timestamp format)

When the grade of the submission was changed.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

actorUserId

string

The teacher who made the grade change.

gradeChangeType

enum(GradeChangeType)

The type of grade change at this time in the submission grade history.

GradeChangeType

Possible grade change types.

Enums
UNKNOWN_GRADE_CHANGE_TYPE No grade change type specified. This should never be returned.
DRAFT_GRADE_POINTS_EARNED_CHANGE A change in the numerator of the draft grade.
ASSIGNED_GRADE_POINTS_EARNED_CHANGE A change in the numerator of the assigned grade.
MAX_POINTS_CHANGE A change in the denominator of the grade.

Methods

get

Returns a student submission.

list

Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request.

modifyAttachments

Modifies attachments of student submission.

patch

Updates one or more fields of a student submission.

reclaim

Reclaims a student submission on behalf of the student that owns it.

return

Returns a student submission.

turnIn

Turns in a student submission.

Send feedback about...

Classroom API
Classroom API