Google Classroom アドオンの一般提供が開始されました。詳しくは、
アドオンのドキュメントをご覧ください。
Method: courses.updateGradingPeriodSettings
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
コースの採点期間の設定を更新します。
この方法では、個々の採点期間を追加、削除、変更できます。
リクエスト元のユーザーとコース オーナーは、採点期間を変更する権限を持っている必要があります。詳細については、ライセンス要件をご覧ください。
このメソッドは、次のエラーコードを返します。
PERMISSION_DENIED
: リクエストしたユーザーがコースの採点期間の設定を変更できない場合、またはアクセス エラーの場合:
- UserIneligibleToUpdateGradingPeriodSettings
INVALID_ARGUMENT
: リクエストの形式が正しくない場合。
NOT_FOUND
: リクエストされたコースが存在しない場合。
HTTP リクエスト
PATCH https://classroom.googleapis.com/v1/courses/{courseId}/gradingPeriodSettings
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
courseId |
string
必須。コースの識別子。
|
クエリ パラメータ
パラメータ |
updateMask |
string (FieldMask format)
GradingPeriodSettings で更新するフィールドを特定するマスク。 GradingPeriodSettings gradingPeriods リストは、更新リクエストで指定された採点期間に完全に置き換えられます。次に例を示します。
- ID なしでリストに追加された採点期間は、追加と見なされ、リクエスト時に新しい ID が割り当てられます。
- 現在存在するがリクエストに含まれていない採点期間は、削除と見なされます。
- 既存の ID と変更されたデータを含む採点期間は、編集と見なされます。変更されていないデータはそのまま残ります。
- 不明な ID を含む採点期間はエラーになります。
次のフィールドを指定できます。
gradingPeriods
applyToExistingCoursework
完全修飾フィールド名のカンマ区切りリスト。例: "user.displayName,photo" 。
|
previewVersion |
enum (PreviewVersion )
省略可。API のプレビュー バージョン。プレビュー プログラムでデベロッパーが利用できる新しい API 機能にアクセスするには、このフラグを設定する必要があります。
|
リクエストの本文
リクエストの本文には GradingPeriodSettings
のインスタンスが含まれます。
レスポンスの本文
成功した場合、レスポンスの本文には GradingPeriodSettings
のインスタンスが含まれます。
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/classroom.courses
詳しくは、認可ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# Method: courses.updateGradingPeriodSettings\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUpdates grading period settings of a course.\n\nIndividual grading periods can be added, removed, or modified using this method.\n\nThe requesting user and course owner must be eligible to modify Grading Periods. For details, see [licensing requirements](https://developers.google.com/workspace/classroom/grading-periods/manage-grading-periods#licensing_requirements).\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting user is not permitted to modify the grading period settings in a course or for [access errors](/workspace/classroom/reference/Access.Errors):\n - UserIneligibleToUpdateGradingPeriodSettings\n- `INVALID_ARGUMENT` if the request is malformed.\n- `NOT_FOUND` if the requested course does not exist.\n\n### HTTP request\n\n`PATCH https://classroom.googleapis.com/v1/courses/{courseId}/gradingPeriodSettings`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------|--------------------------------------------------|\n| `courseId` | `string` Required. The identifier of the course. |\n\n### Query parameters\n\n| Parameters ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Mask that identifies which fields in the GradingPeriodSettings to update. The GradingPeriodSettings `gradingPeriods` list will be fully replaced by the grading periods specified in the update request. For example: - Grading periods included in the list without an ID are considered additions, and a new ID will be assigned when the request is made. - Grading periods that currently exist, but are missing from the request will be considered deletions. - Grading periods with an existing ID and modified data are considered edits. Unmodified data will be left as is. - Grading periods included with an unknown ID will result in an error. The following fields may be specified: - `gradingPeriods` - `applyToExistingCoursework` This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n| `previewVersion` | `enum (`[PreviewVersion](/workspace/classroom/reference/rest/v1/PreviewVersion)`)` Optional. The preview version of the API. This must be set in order to access new API capabilities made available to developers in the Preview Program. |\n\n### Request body\n\nThe request body contains an instance of [GradingPeriodSettings](/workspace/classroom/reference/rest/v1/GradingPeriodSettings).\n\n### Response body\n\nIf successful, the response body contains an instance of [GradingPeriodSettings](/workspace/classroom/reference/rest/v1/GradingPeriodSettings).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.courses`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]