Method: courses.courseWork.modifyAssignees
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
שינוי מצב ההקצאה והאפשרויות של מטלת לימודים.
רק מורים בקורס שמכיל את המטלות יכולים לקרוא לשיטה הזו.
השיטה הזו מחזירה את קודי השגיאה הבאים:
-
PERMISSION_DENIED
אם למשתמש ששולח את הבקשה אין הרשאה לגשת לקורס או לעבודה בקורס המבוקשים, או לשגיאות גישה.
-
INVALID_ARGUMENT
אם הבקשה לא תקינה.
-
NOT_FOUND
אם הקורס או העבודה בקורס המבוקשים לא קיימים.
FAILED_PRECONDITION
בנוגע לשגיאה בבקשה הבאה:
בקשת HTTP
POST https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{id}:modifyAssignees
כתובת ה-URL משתמשת בתחביר של gRPC Transcoding.
פרמטרים של נתיב
פרמטרים |
courseId |
string
מזהה הקורס. המזהה הזה יכול להיות המזהה שהוקצה ב-Classroom או alias .
|
id |
string
מזהה העבודה.
|
גוף הבקשה
גוף הבקשה מכיל נתונים במבנה הבא:
שדות |
assigneeMode |
enum (AssigneeMode )
מצב העבודה, שמתאר אם היא תוקצה לכל התלמידים או לתלמידים ספציפיים.
|
modifyIndividualStudentsOptions |
object (ModifyIndividualStudentsOptions )
קובעים לאילו תלמידים מוקצים חומרי הלימוד ולאילו לא. חובה לציין את הערך רק אם assigneeMode הוא INDIVIDUAL_STUDENTS .
|
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכיל מופע של CourseWork
.
היקפי הרשאה
נדרש היקף ההרשאות הבא של OAuth:
https://www.googleapis.com/auth/classroom.coursework.students
מידע נוסף זמין במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-26 (שעון UTC)."],[],[],null,["- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nModifies assignee mode and options of a coursework.\n\nOnly a teacher of the course that contains the coursework may call this method.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for [access errors](/workspace/classroom/reference/Access.Errors).\n- `INVALID_ARGUMENT` if the request is malformed.\n- `NOT_FOUND` if the requested course or course work does not exist.\n- `FAILED_PRECONDITION` for the following [request error](/workspace/classroom/reference/Request.Errors):\n - EmptyAssignees\n\nHTTP request\n\n`POST https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{id}:modifyAssignees`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `courseId` | `string` Identifier of the course. This identifier can be either the Classroom-assigned identifier or an [alias](/workspace/classroom/reference/rest/v1/courses.aliases#CourseAlias). |\n| `id` | `string` Identifier of the coursework. |\n\nRequest body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"assigneeMode\": enum (/workspace/classroom/reference/rest/v1/AssigneeMode), \"modifyIndividualStudentsOptions\": { object (/workspace/classroom/reference/rest/v1/ModifyIndividualStudentsOptions) } } ``` |\n\n| Fields ||\n|-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `assigneeMode` | `enum (`[AssigneeMode](/workspace/classroom/reference/rest/v1/AssigneeMode)`)` Mode of the coursework describing whether it will be assigned to all students or specified individual students. |\n| `modifyIndividualStudentsOptions` | `object (`[ModifyIndividualStudentsOptions](/workspace/classroom/reference/rest/v1/ModifyIndividualStudentsOptions)`)` Set which students are assigned or not assigned to the coursework. Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`. |\n\nResponse body\n\nIf successful, the response body contains an instance of [CourseWork](/workspace/classroom/reference/rest/v1/courses.courseWork#CourseWork).\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.coursework.students`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]