AddOnContext

特定帖子上下文中的 Google 课堂插件相关附件的元数据。

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

不可变。课程的标识符。

postId
(deprecated)

string

不可变。已弃用,请改用 itemId。

itemId

string

不可变。附件所属的通知、courseWork 或 courseWorkMaterial 的标识符。

supportsStudentWork

boolean

可选。帖子是否允许教师查看学生作业和回传成绩。

联合字段 context

context 只能是下列其中一项:

studentContext

object (StudentContext)

与发出请求的用户的学生角色对应的插件上下文。其存在意味着请求用户是课程中的学生。

teacherContext

object (TeacherContext)

与提出请求的用户的教师角色对应的插件上下文。其存在意味着提出请求的用户是课程中的教师。

StudentContext

特定于角色的上下文(如果发出请求的用户是学生)。

JSON 表示法
{
  "submissionId": string
}
字段
submissionId

string

请求用户的提交内容 ID 用于成绩回传,以及在向教师显示学生作业时识别学生。此字段是在 supportsStudentWork 设为 true 时准确设置。

TeacherContext

此类型没有任何字段。

特定于角色的上下文(如果发出请求的用户是教师)。