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 或 pathWorkMaterial 的 ID。

supportsStudentWork

boolean

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

聯集欄位 context

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

studentContext

object (StudentContext)

與提出要求的使用者擔任學生角色相對應的外掛程式情境。這表示提出要求的使用者是課程中的學生。

teacherContext

object (TeacherContext)

與提出要求的使用者擔任老師角色相對應的外掛程式內容。它暗示提出要求的使用者是課程的老師。

StudentContext

如果提出要求的使用者是學生,則依角色指派特定內容。

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

string

要求使用者提交 ID 用於成績回傳,並在向老師展示學生作業時識別學生。剛好是 supportsStudentWorktrue 時。

TeacherContext

這個類型沒有任何欄位。

如果提出要求的使用者是老師,則依角色指派特定角色。