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 ודוגמאות הקוד הן ברישיון 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."]]