ส่วนเสริมของ Google Classroom พร้อมให้บริการแก่นักพัฒนาซอฟต์แวร์แล้ว โปรดดูข้อมูลเพิ่มเติมใน
เอกสารส่วนเสริม
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
เปลี่ยนแปลงไม่ได้ ตัวระบุของหลักสูตร
|
postId (deprecated) |
string
เปลี่ยนแปลงไม่ได้ เลิกใช้งานแล้ว โปรดใช้ itemId แทน
|
itemId |
string
เปลี่ยนแปลงไม่ได้ ตัวระบุของ Announcement , CourseWork หรือ CourseWorkMaterial ที่แนบไฟล์แนบ
|
supportsStudentWork |
boolean
ไม่บังคับ โพสต์อนุญาตให้ครูดูงานของนักเรียนและส่งคะแนนคืนหรือไม่
|
ฟิลด์สหภาพ context context ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น
|
studentContext |
object (StudentContext )
บริบทของส่วนเสริมที่สอดคล้องกับบทบาทของผู้ใช้ที่ขอเป็นนักเรียน การมีสถานะนี้หมายความว่าผู้ใช้ที่ส่งคำขอเป็นนักเรียนในหลักสูตร
|
teacherContext |
object (TeacherContext )
บริบทของส่วนเสริมที่สอดคล้องกับบทบาทของผู้ใช้ที่ขอเป็นครู การมีสิทธิ์เข้าถึงระดับนี้หมายความว่าผู้ใช้ที่ส่งคำขอเป็นครูในหลักสูตร
|
StudentContext
บริบทเฉพาะบทบาทหากผู้ใช้ที่ส่งคำขอเป็นนักเรียน
การแสดง JSON |
{
"submissionId": string
} |
ช่อง |
submissionId |
string
ขอรหัสการส่งของผู้ใช้เพื่อใช้ส่งคะแนนและระบุนักเรียนเมื่อแสดงงานของนักเรียนให้ครูดู การตั้งค่านี้จะตั้งค่าเมื่อ supportsStudentWork เป็น true
|
TeacherContext
ประเภทนี้ไม่มีช่อง
บริบทเฉพาะบทบาทหากผู้ใช้ที่ส่งคำขอเป็นครู
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],null,["# AddOnContext\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [StudentContext](#StudentContext)\n - [JSON representation](#StudentContext.SCHEMA_REPRESENTATION)\n- [TeacherContext](#TeacherContext)\n\nAttachment-relevant metadata for Classroom add-ons in the context of a specific post.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"courseId\": string, \"postId\": string, \"itemId\": string, \"supportsStudentWork\": boolean, // Union field `context` can be only one of the following: \"studentContext\": { object (/workspace/classroom/reference/rest/v1/AddOnContext#StudentContext) }, \"teacherContext\": { object (/workspace/classroom/reference/rest/v1/AddOnContext#TeacherContext) } // End of list of possible types for union field `context`. } ``` |\n\n| Fields ||\n|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `courseId` | `string` Immutable. Identifier of the course. |\n| `postId` **(deprecated)** | `string` | This item is deprecated! Immutable. Deprecated, use `itemId` instead. |\n| `itemId` | `string` Immutable. Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. |\n| `supportsStudentWork` | `boolean` Optional. Whether the post allows the teacher to see student work and passback grades. |\n| Union field `context`. `context` can be only one of the following: ||\n| `studentContext` | `object (`[StudentContext](/workspace/classroom/reference/rest/v1/AddOnContext#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. |\n| `teacherContext` | `object (`[TeacherContext](/workspace/classroom/reference/rest/v1/AddOnContext#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. |\n\nStudentContext\n--------------\n\nRole-specific context if the requesting user is a student.\n\n| JSON representation |\n|------------------------------------|\n| ``` { \"submissionId\": string } ``` |\n\n| Fields ||\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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`. |\n\nTeacherContext\n--------------\n\nThis type has no fields.\nRole-specific context if the requesting user is a teacher."]]