افزونه های Google Classroom اکنون به طور کلی در دسترس توسعه دهندگان هستند! لطفاً برای اطلاعات بیشتر به
اسناد افزونه ها مراجعه کنید.
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 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی."],[],[],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)."]]