Google Classroom eklentileri artık geliştiricilerin genel kullanımına sunuldu! Daha fazla bilgi edinmek için lütfen
eklenti belgelerini inceleyin.
Method: courses.announcements.modifyAssignees
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bir duyurunun atananlar modunu ve seçeneklerini değiştirir.
Bu yöntem yalnızca duyuruyu içeren kursun öğretmeni tarafından çağrılabilir.
Bu yöntem aşağıdaki hata kodlarını döndürür:
- İstekte bulunan kullanıcının istenen kursa veya kurs çalışmasına erişmesine izin verilmiyorsa ya da erişim hataları için
PERMISSION_DENIED
.
- İstek yanlış biçimlendirilmişse
INVALID_ARGUMENT
.
NOT_FOUND
İstenen kurs veya kurs çalışması mevcut değilse
- Aşağıdaki istek hatası için
FAILED_PRECONDITION
:
HTTP isteği
POST https://classroom.googleapis.com/v1/courses/{courseId}/announcements/{id}:modifyAssignees
URL, gRPC Kod Dönüştürme söz dizimini kullanır.
Yol parametreleri
Parametreler |
courseId |
string
Kursun tanımlayıcısı. Bu tanımlayıcı, Classroom tarafından atanan tanımlayıcı veya bir alias olabilir.
|
id |
string
Duyurunun tanımlayıcısı.
|
İstek içeriği
İstek metni aşağıdaki yapıyla birlikte verileri içerir:
Alanlar |
assigneeMode |
enum (AssigneeMode )
Duyurunun tüm öğrenciler veya belirli öğrenciler tarafından erişilebilir olup olmadığını açıklayan duyuru modu.
|
modifyIndividualStudentsOptions |
object (ModifyIndividualStudentsOptions )
Duyuruyu hangi öğrencilerin görüntüleyebileceğini veya görüntüleyemeyeceğini ayarlayın. Yalnızca assigneeMode , INDIVIDUAL_STUDENTS olduğunda belirtilmelidir.
|
Yanıt gövdesi
Başarılıysa yanıt metni, Announcement
öğesinin bir örneğini içerir.
Yetkilendirme kapsamları
Aşağıdaki OAuth kapsamını gerektirir:
https://www.googleapis.com/auth/classroom.announcements
Daha fazla bilgi için Yetkilendirme kılavuzu'na bakın.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-08-26 UTC.
[null,null,["Son güncelleme tarihi: 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 an announcement.\n\nOnly a teacher of the course that contains the announcement 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}/announcements/{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 announcement. |\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 announcement describing whether it is accessible by all students or specified individual students. |\n| `modifyIndividualStudentsOptions` | `object (`[ModifyIndividualStudentsOptions](/workspace/classroom/reference/rest/v1/ModifyIndividualStudentsOptions)`)` Set which students can view or cannot view the announcement. Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`. |\n\nResponse body\n\nIf successful, the response body contains an instance of [Announcement](/workspace/classroom/reference/rest/v1/courses.announcements#Announcement).\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.announcements`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]