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
詳しくは、承認ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 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)."]]