Google Classroom ऐड-ऑन अब आम तौर पर डेवलपर के लिए उपलब्ध हैं! ज़्यादा जानकारी के लिए, कृपया
ऐड-ऑन दस्तावेज़ देखें.
Method: courses.courseWork.patch
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
कोर्स वर्क के एक या उससे ज़्यादा फ़ील्ड को अपडेट करता है.
किन फ़ील्ड को अपडेट किया जा सकता है और कौन उन्हें बदल सकता है, इस बारे में जानने के लिए google.classroom.v1.CourseWork
देखें.
यह अनुरोध, उस OAuth क्लाइंट आईडी के Developer Console प्रोजेक्ट से किया जाना चाहिए जिसका इस्तेमाल कोर्स वर्क आइटम बनाने के लिए किया गया था.
इस तरीके से, गड़बड़ी के ये कोड मिलते हैं:
PERMISSION_DENIED
अगर अनुरोध करने वाले डेवलपर प्रोजेक्ट ने उससे जुड़ा कोर्स वर्क नहीं बनाया है, अगर उपयोगकर्ता को छात्र/छात्रा के सबमिट किए गए काम में, अनुरोध किया गया बदलाव करने की अनुमति नहीं है या ऐक्सेस से जुड़ी गड़बड़ियों की वजह से.
INVALID_ARGUMENT
अगर अनुरोध गलत है.
FAILED_PRECONDITION
अगर कोर्स का वह काम पहले ही मिटा दिया गया है जिसके लिए अनुरोध किया गया है.
NOT_FOUND
अगर आपने जिस कोर्स या कोर्स वर्क का अनुरोध किया है वह मौजूद नहीं है.
एचटीटीपी अनुरोध
PATCH https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{id}
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
courseId |
string
कोर्स का आइडेंटिफ़ायर. यह आइडेंटिफ़ायर, Classroom से असाइन किया गया आइडेंटिफ़ायर या alias हो सकता है.
|
id |
string
कोर्स वर्क का आइडेंटिफ़ायर.
|
क्वेरी पैरामीटर
पैरामीटर |
updateMask |
string (FieldMask format)
मास्क, जो यह बताता है कि कोर्स वर्क के किन फ़ील्ड को अपडेट करना है. अपडेट करने के लिए, यह फ़ील्ड भरना ज़रूरी है. अमान्य फ़ील्ड की जानकारी देने पर, अपडेट नहीं हो पाता. अगर कोई फ़ील्ड खाली वैल्यू के साथ काम करता है, तो उसे CourseWork ऑब्जेक्ट में नहीं, बल्कि अपडेट मास्क में बताकर खाली किया जा सकता है. अगर अपडेट मास्क में कोई ऐसा फ़ील्ड शामिल किया गया है जिसमें खाली वैल्यू काम नहीं करती हैं और उसे CourseWork ऑब्जेक्ट में सेट नहीं किया गया है, तो INVALID_ARGUMENT गड़बड़ी का मैसेज दिखता है. शिक्षक इन फ़ील्ड की जानकारी दे सकते हैं:
title
description
state
dueDate
dueTime
maxPoints
scheduledTime
submissionModificationMode
topicId
gradingPeriodId
यह फ़ील्ड के पूरी तरह से क्वालिफ़ाइड नामों की सूची है. इसमें नामों को कॉमा लगाकर अलग किया गया है. उदाहरण: "user.displayName,photo" .
|
previewVersion |
enum (PreviewVersion )
ज़रूरी नहीं. एपीआई का झलक वाला वर्शन. झलक देखने की सुविधा वाले प्रोग्राम में डेवलपर के लिए उपलब्ध एपीआई की नई सुविधाओं को ऐक्सेस करने के लिए, यह सेट करना ज़रूरी है.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में CourseWork
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में CourseWork
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/classroom.coursework.students
ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[],[],null,["# Method: courses.courseWork.patch\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 one or more fields of a course work.\n\nSee [google.classroom.v1.CourseWork](/workspace/classroom/reference/rest/v1/courses.courseWork#CourseWork) for details of which fields may be updated and who may change them.\n\nThis request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for [access errors](/workspace/classroom/reference/Access.Errors).\n- `INVALID_ARGUMENT` if the request is malformed.\n- `FAILED_PRECONDITION` if the requested course work has already been deleted.\n- `NOT_FOUND` if the requested course or course work does not exist.\n\n### HTTP request\n\n`PATCH https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{id}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path 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 course work. |\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 on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `CourseWork` object. If a field that does not support empty values is included in the update mask and not set in the `CourseWork` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: - `title` - `description` - `state` - `dueDate` - `dueTime` - `maxPoints` - `scheduledTime` - `submissionModificationMode` - `topicId` - `gradingPeriodId` 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 [CourseWork](/workspace/classroom/reference/rest/v1/courses.courseWork#CourseWork).\n\n### Response body\n\nIf successful, the response body contains an instance of [CourseWork](/workspace/classroom/reference/rest/v1/courses.courseWork#CourseWork).\n\n### Authorization 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)."]]