Method: courses.updateGradingPeriodSettings
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
עדכון ההגדרות של תקופות למתן ציונים בקורס.
אפשר להוסיף, להסיר או לשנות תקופות למתן ציונים בנפרד באמצעות השיטה הזו.
המשתמש ששולח את הבקשה ובעל הקורס צריכים להיות זכאים לשנות את תקופות המטלות. פרטים נוספים זמינים במאמר דרישות הרישוי.
השיטה הזו מחזירה את קודי השגיאה הבאים:
PERMISSION_DENIED
אם למשתמש המבקש אין הרשאה לשנות את ההגדרות של תקופת הבחינות בקורס, או בגלל שגיאות גישה:
- UserIneligibleToUpdateGradingPeriodSettings
INVALID_ARGUMENT
אם הבקשה לא תקינה.
NOT_FOUND
אם הקורס המבוקש לא קיים.
בקשת HTTP
PATCH https://classroom.googleapis.com/v1/courses/{courseId}/gradingPeriodSettings
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
פרמטרים של נתיב
פרמטרים |
courseId |
string
חובה. המזהה של הקורס.
|
פרמטרים של שאילתה
פרמטרים |
updateMask |
string (FieldMask format)
מסכה שמזהה את השדות ב-GradingPeriodSettings שרוצים לעדכן. הרשימה gradingPeriods של GradingPeriodSettings תוחלף באופן מלא בתקופות מתן הציונים שצוינו בבקשת העדכון. לדוגמה:
- תקופות למתן ציונים שכלולות ברשימה ללא מזהה נחשבות כתוספות, ויוקצה להן מזהה חדש כשהבקשה תישלח.
- תקופות למתן ציונים שקיימות כרגע אבל לא מופיעות בבקשה ייחשבו כמחיקות.
- תקופות למתן ציונים עם מזהה קיים ונתונים ששונו נחשבות לעריכות. נתונים שלא שונו יישארו כפי שהם.
- אם תקופות למתן ציונים ייכללו במזהה לא ידוע, תופיע שגיאה.
אפשר לציין את השדות הבאים:
gradingPeriods
applyToExistingCoursework
זוהי רשימה של שמות שדות מוגדרים במלואם, שמופרדים בפסיקים. דוגמה: "user.displayName,photo"
|
previewVersion |
enum (PreviewVersion )
אופציונלי. גרסת ה-Preview של ה-API. צריך להגדיר את ההגדרה הזו כדי לגשת ליכולות API חדשות שזמינות למפתחים בתוכנית ה-Preview.
|
גוף הבקשה
גוף הבקשה מכיל מופע של GradingPeriodSettings
.
גוף התשובה
אם הפעולה מצליחה, גוף התגובה מכיל מופע של GradingPeriodSettings
.
היקפי הרשאה
נדרש היקף הרשאות OAuth הבא:
https://www.googleapis.com/auth/classroom.courses
מידע נוסף זמין במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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)."]]