AddOnContext

特定訊息情境中,Classroom 外掛程式的附件相關中繼資料。

JSON 表示法
{
  "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.
}
欄位
courseId

string

不可變動。課程的 ID。

postId
(deprecated)

string

不可變動。已淘汰,請改用 itemId。

itemId

string

不可變動。附加附件中的公告、CourseWork 或 courseWorkMaterial ID。

supportsStudentWork

boolean

選用設定。是否允許老師查看學生作業和回傳成績。

聯集欄位 context

context 只能採用下列其中一種設定:

studentContext

object (StudentContext)

與提出要求的使用者角色對應的附加內容。因為出現要求的使用者為課程中的學生。

teacherContext

object (TeacherContext)

與提出要求的使用者 (做為老師) 角色對應的附加背景資訊。因為出現這種情況,代表提出要求的使用者是課程中的老師。

StudentContext

要求提出的使用者為學生時,應填入的角色相關資訊。

JSON 表示法
{
  "submissionId": string
}
欄位
submissionId

string

要求提供使用者繳交 ID,以便將成績傳回成績,以及在向老師顯示學生作業時指明學生。這是在 supportsStudentWorktrue 時設定的確切值。

TeacherContext

這個類型沒有任何欄位。

如果提出要求的使用者是老師,則為特定角色的背景資訊。