افزونه های 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
این نوع هیچ فیلدی ندارد.
اگر کاربر درخواست کننده معلم باشد، زمینه نقش خاص.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[],[],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."]]