REST Resource: courses.courseWork.studentSubmissions

Resource: StudentSubmission

Student submission for course work.

StudentSubmission items are generated when a CourseWork item is created.

Student submissions 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,
  "rubricId": string,
  "draftRubricGrades": {
    string: {
      object (RubricGrade)
    },
    ...
  },
  "assignedRubricGrades": {
    string: {
      object (RubricGrade)
    },
    ...
  },
  "alternateLink": string,
  "courseWorkType": enum (CourseWorkType),
  "associatedWithDeveloper": boolean,
  "submissionHistory": [
    {
      object (SubmissionHistory)
    }
  ],
  "previewVersion": enum (PreviewVersion),

  // 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, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "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, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "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 (that is, non-integer) values are allowed, but are 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 (that is, non-integer) values are allowed, but are rounded to two decimal places.

This may be modified only by course teachers.

rubricId

string

Output only. Identifier of the rubric currently attached to this course work and used for grading this student submission.

This ID is empty if there is no rubric. This ID reflects the currently active rubric; it changes if teachers delete and recreate the rubric.

Read-only.

draftRubricGrades

map (key: string, value: object (RubricGrade))

Pending rubric grades based on the rubric's criteria.

This map is empty if there is no rubric attached to this course work or if a rubric is attached, but no grades have been set on any criteria. Entries are only populated for grades that have been set. Key: The rubric's criterion ID.

Read-only.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

assignedRubricGrades

map (key: string, value: object (RubricGrade))

Assigned rubric grades based on the rubric's Criteria.

This map is empty if there is no rubric attached to this course work or if a rubric is attached, but no grades have been set on any Criteria. Entries are only populated for grades that have been set. Key: The rubric's criterion ID.

Read-only.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

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 courseWork.create for more details.

Read-only.

submissionHistory[]

object (SubmissionHistory)

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

Read-only.

previewVersion

enum (PreviewVersion)

Output only. The preview version of the API. This must be set in order to access new API capabilities made available to developers in the Preview Program.

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 studentSubmissions.modifyAttachments.

shortAnswerSubmission

object (ShortAnswerSubmission)

Submission content when courseWorkType is SHORT_ANSWER_QUESTION.

multipleChoiceSubmission

object (MultipleChoiceSubmission)

Submission content when courseWorkType is MULTIPLE_CHOICE_QUESTION.

RubricGrade

A rubric grade set for the student submission. There is at most one entry per rubric criterion.

JSON representation
{
  "criterionId": string,
  "levelId": string,
  "points": number
}
Fields
criterionId

string

Optional. Criterion ID.

levelId

string

Optional. Optional level ID of the selected level. If empty, no level was selected.

points

number

Optional. Optional points assigned for this criterion, typically based on the level. Levels might or might not have points. If unset, no points were set for this criterion.

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 (for example, 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 of SubmissionHistory, can be one of StateHistory, GradeHistory. 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, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "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, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "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.