AddOnContext

Attachment-relevant metadata for Classroom add-ons in the context of a specific post.

JSON representation
{
  "courseId": string,
  "postId": string,
  "itemId": string,
  "supportsStudentWork": boolean,

  // Union field context can be only one of the following:
  "studentContext": {
    object (StudentContext)
  },
  "teacherContext": {
    object (TeacherContext)
  }
  // End of list of possible types for union field context.
}
Fields
courseId

string

Immutable. Identifier of the course.

postId
(deprecated)

string

Immutable. Deprecated, use itemId instead.

itemId

string

Immutable. Identifier of the Announcement, CourseWork, or CourseWorkMaterial under which the attachment is attached.

supportsStudentWork

boolean

Optional. Whether the post allows the teacher to see student work and passback grades.

Union field context.

context can be only one of the following:

studentContext

object (StudentContext)

Add-on context corresponding to the requesting user's role as a student. Its presence implies that the requesting user is a student in the course.

teacherContext

object (TeacherContext)

Add-on context corresponding to the requesting user's role as a teacher. Its presence implies that the requesting user is a teacher in the course.

StudentContext

Role-specific context if the requesting user is a student.

JSON representation
{
  "submissionId": string
}
Fields
submissionId

string

Requesting user's submission id to be used for grade passback and to identify the student when showing student work to the teacher. This is set exactly when supportsStudentWork is true.

TeacherContext

This type has no fields.

Role-specific context if the requesting user is a teacher.