1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="classroom_v1.html">Google Classroom API</a> . <a href="classroom_v1.courses.html">courses</a> . <a href="classroom_v1.courses.courseWork.html">courseWork</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="classroom_v1.courses.courseWork.studentSubmissions.html">studentSubmissions()</a></code>
79</p>
80<p class="firstline">Returns the studentSubmissions Resource.</p>
81
82<p class="toc_element">
83  <code><a href="#create">create(courseId, body, x__xgafv=None)</a></code></p>
84<p class="firstline">Creates course work.</p>
85<p class="toc_element">
86  <code><a href="#delete">delete(courseId, id, x__xgafv=None)</a></code></p>
87<p class="firstline">Deletes a course work.</p>
88<p class="toc_element">
89  <code><a href="#get">get(courseId, id, x__xgafv=None)</a></code></p>
90<p class="firstline">Returns course work.</p>
91<p class="toc_element">
92  <code><a href="#list">list(courseId, orderBy=None, pageSize=None, courseWorkStates=None, pageToken=None, x__xgafv=None)</a></code></p>
93<p class="firstline">Returns a list of course work that the requester is permitted to view.</p>
94<p class="toc_element">
95  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
96<p class="firstline">Retrieves the next page of results.</p>
97<p class="toc_element">
98  <code><a href="#modifyAssignees">modifyAssignees(courseId, id, body, x__xgafv=None)</a></code></p>
99<p class="firstline">Modifies assignee mode and options of a coursework.</p>
100<p class="toc_element">
101  <code><a href="#patch">patch(courseId, id, body, updateMask=None, x__xgafv=None)</a></code></p>
102<p class="firstline">Updates one or more fields of a course work.</p>
103<h3>Method Details</h3>
104<div class="method">
105    <code class="details" id="create">create(courseId, body, x__xgafv=None)</code>
106  <pre>Creates course work.
107
108The resulting course work (and corresponding student submissions) are
109associated with the Developer Console project of the
110[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
111make the request. Classroom API requests to modify course work and student
112submissions must be made with an OAuth client ID from the associated
113Developer Console project.
114
115This method returns the following error codes:
116
117* `PERMISSION_DENIED` if the requesting user is not permitted to access the
118requested course, create course work in the requested course, share a
119Drive attachment, or for access errors.
120* `INVALID_ARGUMENT` if the request is malformed.
121* `NOT_FOUND` if the requested course does not exist.
122* `FAILED_PRECONDITION` for the following request error:
123    * AttachmentNotVisible
124
125Args:
126  courseId: string, Identifier of the course.
127This identifier can be either the Classroom-assigned identifier or an
128alias. (required)
129  body: object, The request body. (required)
130    The object takes the form of:
131
132{ # Course work created by a teacher for students of the course.
133  "updateTime": "A String", # Timestamp of the most recent change to this course work.
134      #
135      # Read-only.
136  "courseId": "A String", # Identifier of the course.
137      #
138      # Read-only.
139  "assigneeMode": "A String", # Assignee mode of the coursework.
140      # If unspecified, the default value is `ALL_STUDENTS`.
141  "id": "A String", # Classroom-assigned identifier of this course work, unique per course.
142      #
143      # Read-only.
144  "submissionModificationMode": "A String", # Setting to determine when students are allowed to modify submissions.
145      # If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
146  "creatorUserId": "A String", # Identifier for the user that created the coursework.
147      #
148      # Read-only.
149  "dueDate": { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # Optional date, in UTC, that submissions for this course work are due.
150      # This must be specified if `due_time` is specified.
151      # and time zone are either specified elsewhere or are not significant. The date
152      # is relative to the Proleptic Gregorian Calendar. This can represent:
153      #
154      # * A full date, with non-zero year, month and day values
155      # * A month and day value, with a zero year, e.g. an anniversary
156      # * A year on its own, with zero month and day values
157      # * A year and month value, with a zero day, e.g. a credit card expiration date
158      #
159      # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
160    "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
161        # month and day.
162    "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
163        # if specifying a year by itself or a year and month where the day is not
164        # significant.
165    "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
166        # a year.
167  },
168  "state": "A String", # Status of this course work.
169      # If unspecified, the default state is `DRAFT`.
170  "dueTime": { # Represents a time of day. The date and time zone are either not significant # Optional time of day, in UTC, that submissions for this course work
171      # are due.
172      # This must be specified if `due_date` is specified.
173      # or are specified elsewhere. An API may choose to allow leap seconds. Related
174      # types are google.type.Date and `google.protobuf.Timestamp`.
175    "hours": 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
176        # to allow the value "24:00:00" for scenarios like business closing time.
177    "nanos": 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
178    "minutes": 42, # Minutes of hour of day. Must be from 0 to 59.
179    "seconds": 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may
180        # allow the value 60 if it allows leap-seconds.
181  },
182  "topicId": "A String", # Identifier for the topic that this coursework is associated with.
183      # Must match an existing topic in the course.
184  "description": "A String", # Optional description of this course work.
185      # If set, the description must be a valid UTF-8 string containing no more
186      # than 30,000 characters.
187  "assignment": { # Additional details for assignments. # Assignment details.
188      # This is populated only when `work_type` is `ASSIGNMENT`.
189      #
190      # Read-only.
191    "studentWorkFolder": { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed.
192        # This is only populated for course teachers and administrators.
193      "alternateLink": "A String", # URL that can be used to access the Drive folder.
194          #
195          # Read-only.
196      "id": "A String", # Drive API resource ID.
197      "title": "A String", # Title of the Drive folder.
198          #
199          # Read-only.
200    },
201  },
202  "scheduledTime": "A String", # Optional timestamp when this course work is scheduled to be published.
203  "associatedWithDeveloper": True or False, # Whether this course work item is associated with the Developer Console
204      # project making the request.
205      #
206      # See google.classroom.Work.CreateCourseWork for more
207      # details.
208      #
209      # Read-only.
210  "maxPoints": 3.14, # Maximum grade for this course work.
211      # If zero or unspecified, this assignment is considered ungraded.
212      # This must be a non-negative integer value.
213  "workType": "A String", # Type of this course work.
214      #
215      # The type is set when the course work is created and cannot be changed.
216  "alternateLink": "A String", # Absolute link to this course work in the Classroom web UI.
217      # This is only populated if `state` is `PUBLISHED`.
218      #
219      # Read-only.
220  "title": "A String", # Title of this course work.
221      # The title must be a valid UTF-8 string containing between 1 and 3000
222      # characters.
223  "creationTime": "A String", # Timestamp when this course work was created.
224      #
225      # Read-only.
226  "materials": [ # Additional materials.
227      #
228      # CourseWork must have no more than 20 material items.
229    { # Material attached to course work.
230        #
231        # When creating attachments, setting the `form` field is not supported.
232      "youtubeVideo": { # YouTube video item. # YouTube video material.
233        "alternateLink": "A String", # URL that can be used to view the YouTube video.
234            #
235            # Read-only.
236        "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video.
237            #
238            # Read-only.
239        "id": "A String", # YouTube API resource ID.
240        "title": "A String", # Title of the YouTube video.
241            #
242            # Read-only.
243      },
244      "driveFile": { # Drive file that is used as material for course work. # Google Drive file material.
245        "driveFile": { # Representation of a Google Drive file. # Drive file details.
246          "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item.
247              #
248              # Read-only.
249          "alternateLink": "A String", # URL that can be used to access the Drive item.
250              #
251              # Read-only.
252          "id": "A String", # Drive API resource ID.
253          "title": "A String", # Title of the Drive item.
254              #
255              # Read-only.
256        },
257        "shareMode": "A String", # Mechanism by which students access the Drive item.
258      },
259      "link": { # URL item. # Link material. On creation, will be upgraded to a more appropriate type
260          # if possible, and this will be reflected in the response.
261        "url": "A String", # URL to link to.
262            # This must be a valid UTF-8 string containing between 1 and 2024 characters.
263        "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL.
264            #
265            # Read-only.
266        "title": "A String", # Title of the target of the URL.
267            #
268            # Read-only.
269      },
270      "form": { # Google Forms item. # Google Forms material.
271        "formUrl": "A String", # URL of the form.
272        "thumbnailUrl": "A String", # URL of a thumbnail image of the Form.
273            #
274            # Read-only.
275        "responseUrl": "A String", # URL of the form responses document.
276            # Only set if respsonses have been recorded and only when the
277            # requesting user is an editor of the form.
278            #
279            # Read-only.
280        "title": "A String", # Title of the Form.
281            #
282            # Read-only.
283      },
284    },
285  ],
286  "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the coursework.
287      # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
288      # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
289      # specified in this field will be assigned the coursework.
290      # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
291    "studentIds": [ # Identifiers for the students that have access to the
292        # coursework/announcement.
293      "A String",
294    ],
295  },
296  "multipleChoiceQuestion": { # Additional details for multiple-choice questions. # Multiple choice question details.
297      # For read operations, this field is populated only when `work_type` is
298      # `MULTIPLE_CHOICE_QUESTION`.
299      # For write operations, this field must be specified when creating course
300      # work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be
301      # set otherwise.
302    "choices": [ # Possible choices.
303      "A String",
304    ],
305  },
306}
307
308  x__xgafv: string, V1 error format.
309    Allowed values
310      1 - v1 error format
311      2 - v2 error format
312
313Returns:
314  An object of the form:
315
316    { # Course work created by a teacher for students of the course.
317    "updateTime": "A String", # Timestamp of the most recent change to this course work.
318        #
319        # Read-only.
320    "courseId": "A String", # Identifier of the course.
321        #
322        # Read-only.
323    "assigneeMode": "A String", # Assignee mode of the coursework.
324        # If unspecified, the default value is `ALL_STUDENTS`.
325    "id": "A String", # Classroom-assigned identifier of this course work, unique per course.
326        #
327        # Read-only.
328    "submissionModificationMode": "A String", # Setting to determine when students are allowed to modify submissions.
329        # If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
330    "creatorUserId": "A String", # Identifier for the user that created the coursework.
331        #
332        # Read-only.
333    "dueDate": { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # Optional date, in UTC, that submissions for this course work are due.
334        # This must be specified if `due_time` is specified.
335        # and time zone are either specified elsewhere or are not significant. The date
336        # is relative to the Proleptic Gregorian Calendar. This can represent:
337        #
338        # * A full date, with non-zero year, month and day values
339        # * A month and day value, with a zero year, e.g. an anniversary
340        # * A year on its own, with zero month and day values
341        # * A year and month value, with a zero day, e.g. a credit card expiration date
342        #
343        # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
344      "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
345          # month and day.
346      "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
347          # if specifying a year by itself or a year and month where the day is not
348          # significant.
349      "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
350          # a year.
351    },
352    "state": "A String", # Status of this course work.
353        # If unspecified, the default state is `DRAFT`.
354    "dueTime": { # Represents a time of day. The date and time zone are either not significant # Optional time of day, in UTC, that submissions for this course work
355        # are due.
356        # This must be specified if `due_date` is specified.
357        # or are specified elsewhere. An API may choose to allow leap seconds. Related
358        # types are google.type.Date and `google.protobuf.Timestamp`.
359      "hours": 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
360          # to allow the value "24:00:00" for scenarios like business closing time.
361      "nanos": 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
362      "minutes": 42, # Minutes of hour of day. Must be from 0 to 59.
363      "seconds": 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may
364          # allow the value 60 if it allows leap-seconds.
365    },
366    "topicId": "A String", # Identifier for the topic that this coursework is associated with.
367        # Must match an existing topic in the course.
368    "description": "A String", # Optional description of this course work.
369        # If set, the description must be a valid UTF-8 string containing no more
370        # than 30,000 characters.
371    "assignment": { # Additional details for assignments. # Assignment details.
372        # This is populated only when `work_type` is `ASSIGNMENT`.
373        #
374        # Read-only.
375      "studentWorkFolder": { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed.
376          # This is only populated for course teachers and administrators.
377        "alternateLink": "A String", # URL that can be used to access the Drive folder.
378            #
379            # Read-only.
380        "id": "A String", # Drive API resource ID.
381        "title": "A String", # Title of the Drive folder.
382            #
383            # Read-only.
384      },
385    },
386    "scheduledTime": "A String", # Optional timestamp when this course work is scheduled to be published.
387    "associatedWithDeveloper": True or False, # Whether this course work item is associated with the Developer Console
388        # project making the request.
389        #
390        # See google.classroom.Work.CreateCourseWork for more
391        # details.
392        #
393        # Read-only.
394    "maxPoints": 3.14, # Maximum grade for this course work.
395        # If zero or unspecified, this assignment is considered ungraded.
396        # This must be a non-negative integer value.
397    "workType": "A String", # Type of this course work.
398        #
399        # The type is set when the course work is created and cannot be changed.
400    "alternateLink": "A String", # Absolute link to this course work in the Classroom web UI.
401        # This is only populated if `state` is `PUBLISHED`.
402        #
403        # Read-only.
404    "title": "A String", # Title of this course work.
405        # The title must be a valid UTF-8 string containing between 1 and 3000
406        # characters.
407    "creationTime": "A String", # Timestamp when this course work was created.
408        #
409        # Read-only.
410    "materials": [ # Additional materials.
411        #
412        # CourseWork must have no more than 20 material items.
413      { # Material attached to course work.
414          #
415          # When creating attachments, setting the `form` field is not supported.
416        "youtubeVideo": { # YouTube video item. # YouTube video material.
417          "alternateLink": "A String", # URL that can be used to view the YouTube video.
418              #
419              # Read-only.
420          "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video.
421              #
422              # Read-only.
423          "id": "A String", # YouTube API resource ID.
424          "title": "A String", # Title of the YouTube video.
425              #
426              # Read-only.
427        },
428        "driveFile": { # Drive file that is used as material for course work. # Google Drive file material.
429          "driveFile": { # Representation of a Google Drive file. # Drive file details.
430            "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item.
431                #
432                # Read-only.
433            "alternateLink": "A String", # URL that can be used to access the Drive item.
434                #
435                # Read-only.
436            "id": "A String", # Drive API resource ID.
437            "title": "A String", # Title of the Drive item.
438                #
439                # Read-only.
440          },
441          "shareMode": "A String", # Mechanism by which students access the Drive item.
442        },
443        "link": { # URL item. # Link material. On creation, will be upgraded to a more appropriate type
444            # if possible, and this will be reflected in the response.
445          "url": "A String", # URL to link to.
446              # This must be a valid UTF-8 string containing between 1 and 2024 characters.
447          "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL.
448              #
449              # Read-only.
450          "title": "A String", # Title of the target of the URL.
451              #
452              # Read-only.
453        },
454        "form": { # Google Forms item. # Google Forms material.
455          "formUrl": "A String", # URL of the form.
456          "thumbnailUrl": "A String", # URL of a thumbnail image of the Form.
457              #
458              # Read-only.
459          "responseUrl": "A String", # URL of the form responses document.
460              # Only set if respsonses have been recorded and only when the
461              # requesting user is an editor of the form.
462              #
463              # Read-only.
464          "title": "A String", # Title of the Form.
465              #
466              # Read-only.
467        },
468      },
469    ],
470    "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the coursework.
471        # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
472        # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
473        # specified in this field will be assigned the coursework.
474        # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
475      "studentIds": [ # Identifiers for the students that have access to the
476          # coursework/announcement.
477        "A String",
478      ],
479    },
480    "multipleChoiceQuestion": { # Additional details for multiple-choice questions. # Multiple choice question details.
481        # For read operations, this field is populated only when `work_type` is
482        # `MULTIPLE_CHOICE_QUESTION`.
483        # For write operations, this field must be specified when creating course
484        # work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be
485        # set otherwise.
486      "choices": [ # Possible choices.
487        "A String",
488      ],
489    },
490  }</pre>
491</div>
492
493<div class="method">
494    <code class="details" id="delete">delete(courseId, id, x__xgafv=None)</code>
495  <pre>Deletes a course work.
496
497This request must be made by the Developer Console project of the
498[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
499create the corresponding course work item.
500
501This method returns the following error codes:
502
503* `PERMISSION_DENIED` if the requesting developer project did not create
504the corresponding course work, if the requesting user is not permitted
505to delete the requested course or for access errors.
506* `FAILED_PRECONDITION` if the requested course work has already been
507deleted.
508* `NOT_FOUND` if no course exists with the requested ID.
509
510Args:
511  courseId: string, Identifier of the course.
512This identifier can be either the Classroom-assigned identifier or an
513alias. (required)
514  id: string, Identifier of the course work to delete.
515This identifier is a Classroom-assigned identifier. (required)
516  x__xgafv: string, V1 error format.
517    Allowed values
518      1 - v1 error format
519      2 - v2 error format
520
521Returns:
522  An object of the form:
523
524    { # A generic empty message that you can re-use to avoid defining duplicated
525      # empty messages in your APIs. A typical example is to use it as the request
526      # or the response type of an API method. For instance:
527      #
528      #     service Foo {
529      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
530      #     }
531      #
532      # The JSON representation for `Empty` is empty JSON object `{}`.
533  }</pre>
534</div>
535
536<div class="method">
537    <code class="details" id="get">get(courseId, id, x__xgafv=None)</code>
538  <pre>Returns course work.
539
540This method returns the following error codes:
541
542* `PERMISSION_DENIED` if the requesting user is not permitted to access the
543requested course or course work, or for access errors.
544* `INVALID_ARGUMENT` if the request is malformed.
545* `NOT_FOUND` if the requested course or course work does not exist.
546
547Args:
548  courseId: string, Identifier of the course.
549This identifier can be either the Classroom-assigned identifier or an
550alias. (required)
551  id: string, Identifier of the course work. (required)
552  x__xgafv: string, V1 error format.
553    Allowed values
554      1 - v1 error format
555      2 - v2 error format
556
557Returns:
558  An object of the form:
559
560    { # Course work created by a teacher for students of the course.
561    "updateTime": "A String", # Timestamp of the most recent change to this course work.
562        #
563        # Read-only.
564    "courseId": "A String", # Identifier of the course.
565        #
566        # Read-only.
567    "assigneeMode": "A String", # Assignee mode of the coursework.
568        # If unspecified, the default value is `ALL_STUDENTS`.
569    "id": "A String", # Classroom-assigned identifier of this course work, unique per course.
570        #
571        # Read-only.
572    "submissionModificationMode": "A String", # Setting to determine when students are allowed to modify submissions.
573        # If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
574    "creatorUserId": "A String", # Identifier for the user that created the coursework.
575        #
576        # Read-only.
577    "dueDate": { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # Optional date, in UTC, that submissions for this course work are due.
578        # This must be specified if `due_time` is specified.
579        # and time zone are either specified elsewhere or are not significant. The date
580        # is relative to the Proleptic Gregorian Calendar. This can represent:
581        #
582        # * A full date, with non-zero year, month and day values
583        # * A month and day value, with a zero year, e.g. an anniversary
584        # * A year on its own, with zero month and day values
585        # * A year and month value, with a zero day, e.g. a credit card expiration date
586        #
587        # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
588      "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
589          # month and day.
590      "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
591          # if specifying a year by itself or a year and month where the day is not
592          # significant.
593      "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
594          # a year.
595    },
596    "state": "A String", # Status of this course work.
597        # If unspecified, the default state is `DRAFT`.
598    "dueTime": { # Represents a time of day. The date and time zone are either not significant # Optional time of day, in UTC, that submissions for this course work
599        # are due.
600        # This must be specified if `due_date` is specified.
601        # or are specified elsewhere. An API may choose to allow leap seconds. Related
602        # types are google.type.Date and `google.protobuf.Timestamp`.
603      "hours": 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
604          # to allow the value "24:00:00" for scenarios like business closing time.
605      "nanos": 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
606      "minutes": 42, # Minutes of hour of day. Must be from 0 to 59.
607      "seconds": 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may
608          # allow the value 60 if it allows leap-seconds.
609    },
610    "topicId": "A String", # Identifier for the topic that this coursework is associated with.
611        # Must match an existing topic in the course.
612    "description": "A String", # Optional description of this course work.
613        # If set, the description must be a valid UTF-8 string containing no more
614        # than 30,000 characters.
615    "assignment": { # Additional details for assignments. # Assignment details.
616        # This is populated only when `work_type` is `ASSIGNMENT`.
617        #
618        # Read-only.
619      "studentWorkFolder": { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed.
620          # This is only populated for course teachers and administrators.
621        "alternateLink": "A String", # URL that can be used to access the Drive folder.
622            #
623            # Read-only.
624        "id": "A String", # Drive API resource ID.
625        "title": "A String", # Title of the Drive folder.
626            #
627            # Read-only.
628      },
629    },
630    "scheduledTime": "A String", # Optional timestamp when this course work is scheduled to be published.
631    "associatedWithDeveloper": True or False, # Whether this course work item is associated with the Developer Console
632        # project making the request.
633        #
634        # See google.classroom.Work.CreateCourseWork for more
635        # details.
636        #
637        # Read-only.
638    "maxPoints": 3.14, # Maximum grade for this course work.
639        # If zero or unspecified, this assignment is considered ungraded.
640        # This must be a non-negative integer value.
641    "workType": "A String", # Type of this course work.
642        #
643        # The type is set when the course work is created and cannot be changed.
644    "alternateLink": "A String", # Absolute link to this course work in the Classroom web UI.
645        # This is only populated if `state` is `PUBLISHED`.
646        #
647        # Read-only.
648    "title": "A String", # Title of this course work.
649        # The title must be a valid UTF-8 string containing between 1 and 3000
650        # characters.
651    "creationTime": "A String", # Timestamp when this course work was created.
652        #
653        # Read-only.
654    "materials": [ # Additional materials.
655        #
656        # CourseWork must have no more than 20 material items.
657      { # Material attached to course work.
658          #
659          # When creating attachments, setting the `form` field is not supported.
660        "youtubeVideo": { # YouTube video item. # YouTube video material.
661          "alternateLink": "A String", # URL that can be used to view the YouTube video.
662              #
663              # Read-only.
664          "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video.
665              #
666              # Read-only.
667          "id": "A String", # YouTube API resource ID.
668          "title": "A String", # Title of the YouTube video.
669              #
670              # Read-only.
671        },
672        "driveFile": { # Drive file that is used as material for course work. # Google Drive file material.
673          "driveFile": { # Representation of a Google Drive file. # Drive file details.
674            "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item.
675                #
676                # Read-only.
677            "alternateLink": "A String", # URL that can be used to access the Drive item.
678                #
679                # Read-only.
680            "id": "A String", # Drive API resource ID.
681            "title": "A String", # Title of the Drive item.
682                #
683                # Read-only.
684          },
685          "shareMode": "A String", # Mechanism by which students access the Drive item.
686        },
687        "link": { # URL item. # Link material. On creation, will be upgraded to a more appropriate type
688            # if possible, and this will be reflected in the response.
689          "url": "A String", # URL to link to.
690              # This must be a valid UTF-8 string containing between 1 and 2024 characters.
691          "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL.
692              #
693              # Read-only.
694          "title": "A String", # Title of the target of the URL.
695              #
696              # Read-only.
697        },
698        "form": { # Google Forms item. # Google Forms material.
699          "formUrl": "A String", # URL of the form.
700          "thumbnailUrl": "A String", # URL of a thumbnail image of the Form.
701              #
702              # Read-only.
703          "responseUrl": "A String", # URL of the form responses document.
704              # Only set if respsonses have been recorded and only when the
705              # requesting user is an editor of the form.
706              #
707              # Read-only.
708          "title": "A String", # Title of the Form.
709              #
710              # Read-only.
711        },
712      },
713    ],
714    "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the coursework.
715        # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
716        # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
717        # specified in this field will be assigned the coursework.
718        # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
719      "studentIds": [ # Identifiers for the students that have access to the
720          # coursework/announcement.
721        "A String",
722      ],
723    },
724    "multipleChoiceQuestion": { # Additional details for multiple-choice questions. # Multiple choice question details.
725        # For read operations, this field is populated only when `work_type` is
726        # `MULTIPLE_CHOICE_QUESTION`.
727        # For write operations, this field must be specified when creating course
728        # work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be
729        # set otherwise.
730      "choices": [ # Possible choices.
731        "A String",
732      ],
733    },
734  }</pre>
735</div>
736
737<div class="method">
738    <code class="details" id="list">list(courseId, orderBy=None, pageSize=None, courseWorkStates=None, pageToken=None, x__xgafv=None)</code>
739  <pre>Returns a list of course work that the requester is permitted to view.
740
741Course students may only view `PUBLISHED` course work. Course teachers
742and domain administrators may view all course work.
743
744This method returns the following error codes:
745
746* `PERMISSION_DENIED` if the requesting user is not permitted to access
747the requested course or for access errors.
748* `INVALID_ARGUMENT` if the request is malformed.
749* `NOT_FOUND` if the requested course does not exist.
750
751Args:
752  courseId: string, Identifier of the course.
753This identifier can be either the Classroom-assigned identifier or an
754alias. (required)
755  orderBy: string, Optional sort ordering for results. A comma-separated list of fields with
756an optional sort direction keyword. Supported fields are `updateTime`
757and `dueDate`. Supported direction keywords are `asc` and `desc`.
758If not specified, `updateTime desc` is the default behavior.
759Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`
760  pageSize: integer, Maximum number of items to return. Zero or unspecified indicates that the
761server may assign a maximum.
762
763The server may return fewer than the specified number of results.
764  courseWorkStates: string, Restriction on the work status to return. Only courseWork that matches
765is returned. If unspecified, items with a work status of `PUBLISHED`
766is returned. (repeated)
767  pageToken: string, nextPageToken
768value returned from a previous
769list call,
770indicating that the subsequent page of results should be returned.
771
772The list request
773must be otherwise identical to the one that resulted in this token.
774  x__xgafv: string, V1 error format.
775    Allowed values
776      1 - v1 error format
777      2 - v2 error format
778
779Returns:
780  An object of the form:
781
782    { # Response when listing course work.
783    "nextPageToken": "A String", # Token identifying the next page of results to return. If empty, no further
784        # results are available.
785    "courseWork": [ # Course work items that match the request.
786      { # Course work created by a teacher for students of the course.
787        "updateTime": "A String", # Timestamp of the most recent change to this course work.
788            #
789            # Read-only.
790        "courseId": "A String", # Identifier of the course.
791            #
792            # Read-only.
793        "assigneeMode": "A String", # Assignee mode of the coursework.
794            # If unspecified, the default value is `ALL_STUDENTS`.
795        "id": "A String", # Classroom-assigned identifier of this course work, unique per course.
796            #
797            # Read-only.
798        "submissionModificationMode": "A String", # Setting to determine when students are allowed to modify submissions.
799            # If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
800        "creatorUserId": "A String", # Identifier for the user that created the coursework.
801            #
802            # Read-only.
803        "dueDate": { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # Optional date, in UTC, that submissions for this course work are due.
804            # This must be specified if `due_time` is specified.
805            # and time zone are either specified elsewhere or are not significant. The date
806            # is relative to the Proleptic Gregorian Calendar. This can represent:
807            #
808            # * A full date, with non-zero year, month and day values
809            # * A month and day value, with a zero year, e.g. an anniversary
810            # * A year on its own, with zero month and day values
811            # * A year and month value, with a zero day, e.g. a credit card expiration date
812            #
813            # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
814          "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
815              # month and day.
816          "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
817              # if specifying a year by itself or a year and month where the day is not
818              # significant.
819          "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
820              # a year.
821        },
822        "state": "A String", # Status of this course work.
823            # If unspecified, the default state is `DRAFT`.
824        "dueTime": { # Represents a time of day. The date and time zone are either not significant # Optional time of day, in UTC, that submissions for this course work
825            # are due.
826            # This must be specified if `due_date` is specified.
827            # or are specified elsewhere. An API may choose to allow leap seconds. Related
828            # types are google.type.Date and `google.protobuf.Timestamp`.
829          "hours": 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
830              # to allow the value "24:00:00" for scenarios like business closing time.
831          "nanos": 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
832          "minutes": 42, # Minutes of hour of day. Must be from 0 to 59.
833          "seconds": 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may
834              # allow the value 60 if it allows leap-seconds.
835        },
836        "topicId": "A String", # Identifier for the topic that this coursework is associated with.
837            # Must match an existing topic in the course.
838        "description": "A String", # Optional description of this course work.
839            # If set, the description must be a valid UTF-8 string containing no more
840            # than 30,000 characters.
841        "assignment": { # Additional details for assignments. # Assignment details.
842            # This is populated only when `work_type` is `ASSIGNMENT`.
843            #
844            # Read-only.
845          "studentWorkFolder": { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed.
846              # This is only populated for course teachers and administrators.
847            "alternateLink": "A String", # URL that can be used to access the Drive folder.
848                #
849                # Read-only.
850            "id": "A String", # Drive API resource ID.
851            "title": "A String", # Title of the Drive folder.
852                #
853                # Read-only.
854          },
855        },
856        "scheduledTime": "A String", # Optional timestamp when this course work is scheduled to be published.
857        "associatedWithDeveloper": True or False, # Whether this course work item is associated with the Developer Console
858            # project making the request.
859            #
860            # See google.classroom.Work.CreateCourseWork for more
861            # details.
862            #
863            # Read-only.
864        "maxPoints": 3.14, # Maximum grade for this course work.
865            # If zero or unspecified, this assignment is considered ungraded.
866            # This must be a non-negative integer value.
867        "workType": "A String", # Type of this course work.
868            #
869            # The type is set when the course work is created and cannot be changed.
870        "alternateLink": "A String", # Absolute link to this course work in the Classroom web UI.
871            # This is only populated if `state` is `PUBLISHED`.
872            #
873            # Read-only.
874        "title": "A String", # Title of this course work.
875            # The title must be a valid UTF-8 string containing between 1 and 3000
876            # characters.
877        "creationTime": "A String", # Timestamp when this course work was created.
878            #
879            # Read-only.
880        "materials": [ # Additional materials.
881            #
882            # CourseWork must have no more than 20 material items.
883          { # Material attached to course work.
884              #
885              # When creating attachments, setting the `form` field is not supported.
886            "youtubeVideo": { # YouTube video item. # YouTube video material.
887              "alternateLink": "A String", # URL that can be used to view the YouTube video.
888                  #
889                  # Read-only.
890              "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video.
891                  #
892                  # Read-only.
893              "id": "A String", # YouTube API resource ID.
894              "title": "A String", # Title of the YouTube video.
895                  #
896                  # Read-only.
897            },
898            "driveFile": { # Drive file that is used as material for course work. # Google Drive file material.
899              "driveFile": { # Representation of a Google Drive file. # Drive file details.
900                "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item.
901                    #
902                    # Read-only.
903                "alternateLink": "A String", # URL that can be used to access the Drive item.
904                    #
905                    # Read-only.
906                "id": "A String", # Drive API resource ID.
907                "title": "A String", # Title of the Drive item.
908                    #
909                    # Read-only.
910              },
911              "shareMode": "A String", # Mechanism by which students access the Drive item.
912            },
913            "link": { # URL item. # Link material. On creation, will be upgraded to a more appropriate type
914                # if possible, and this will be reflected in the response.
915              "url": "A String", # URL to link to.
916                  # This must be a valid UTF-8 string containing between 1 and 2024 characters.
917              "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL.
918                  #
919                  # Read-only.
920              "title": "A String", # Title of the target of the URL.
921                  #
922                  # Read-only.
923            },
924            "form": { # Google Forms item. # Google Forms material.
925              "formUrl": "A String", # URL of the form.
926              "thumbnailUrl": "A String", # URL of a thumbnail image of the Form.
927                  #
928                  # Read-only.
929              "responseUrl": "A String", # URL of the form responses document.
930                  # Only set if respsonses have been recorded and only when the
931                  # requesting user is an editor of the form.
932                  #
933                  # Read-only.
934              "title": "A String", # Title of the Form.
935                  #
936                  # Read-only.
937            },
938          },
939        ],
940        "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the coursework.
941            # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
942            # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
943            # specified in this field will be assigned the coursework.
944            # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
945          "studentIds": [ # Identifiers for the students that have access to the
946              # coursework/announcement.
947            "A String",
948          ],
949        },
950        "multipleChoiceQuestion": { # Additional details for multiple-choice questions. # Multiple choice question details.
951            # For read operations, this field is populated only when `work_type` is
952            # `MULTIPLE_CHOICE_QUESTION`.
953            # For write operations, this field must be specified when creating course
954            # work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be
955            # set otherwise.
956          "choices": [ # Possible choices.
957            "A String",
958          ],
959        },
960      },
961    ],
962  }</pre>
963</div>
964
965<div class="method">
966    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
967  <pre>Retrieves the next page of results.
968
969Args:
970  previous_request: The request for the previous page. (required)
971  previous_response: The response from the request for the previous page. (required)
972
973Returns:
974  A request object that you can call 'execute()' on to request the next
975  page. Returns None if there are no more items in the collection.
976    </pre>
977</div>
978
979<div class="method">
980    <code class="details" id="modifyAssignees">modifyAssignees(courseId, id, body, x__xgafv=None)</code>
981  <pre>Modifies assignee mode and options of a coursework.
982
983Only a teacher of the course that contains the coursework may
984call this method.
985
986This method returns the following error codes:
987
988* `PERMISSION_DENIED` if the requesting user is not permitted to access the
989requested course or course work or for access errors.
990* `INVALID_ARGUMENT` if the request is malformed.
991* `NOT_FOUND` if the requested course or course work does not exist.
992
993Args:
994  courseId: string, Identifier of the course.
995This identifier can be either the Classroom-assigned identifier or an
996alias. (required)
997  id: string, Identifier of the coursework. (required)
998  body: object, The request body. (required)
999    The object takes the form of:
1000
1001{ # Request to modify assignee mode and options of a coursework.
1002    "assigneeMode": "A String", # Mode of the coursework describing whether it will be assigned to all
1003        # students or specified individual students.
1004    "modifyIndividualStudentsOptions": { # Contains fields to add or remove students from a course work or announcement # Set which students are assigned or not assigned to the coursework.
1005        # Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`.
1006        # where the `assigneeMode` is set to `INDIVIDUAL_STUDENTS`.
1007      "addStudentIds": [ # Ids of students to be added as having access to this
1008          # coursework/announcement.
1009        "A String",
1010      ],
1011      "removeStudentIds": [ # Ids of students to be removed from having access to this
1012          # coursework/announcement.
1013        "A String",
1014      ],
1015    },
1016  }
1017
1018  x__xgafv: string, V1 error format.
1019    Allowed values
1020      1 - v1 error format
1021      2 - v2 error format
1022
1023Returns:
1024  An object of the form:
1025
1026    { # Course work created by a teacher for students of the course.
1027    "updateTime": "A String", # Timestamp of the most recent change to this course work.
1028        #
1029        # Read-only.
1030    "courseId": "A String", # Identifier of the course.
1031        #
1032        # Read-only.
1033    "assigneeMode": "A String", # Assignee mode of the coursework.
1034        # If unspecified, the default value is `ALL_STUDENTS`.
1035    "id": "A String", # Classroom-assigned identifier of this course work, unique per course.
1036        #
1037        # Read-only.
1038    "submissionModificationMode": "A String", # Setting to determine when students are allowed to modify submissions.
1039        # If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
1040    "creatorUserId": "A String", # Identifier for the user that created the coursework.
1041        #
1042        # Read-only.
1043    "dueDate": { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # Optional date, in UTC, that submissions for this course work are due.
1044        # This must be specified if `due_time` is specified.
1045        # and time zone are either specified elsewhere or are not significant. The date
1046        # is relative to the Proleptic Gregorian Calendar. This can represent:
1047        #
1048        # * A full date, with non-zero year, month and day values
1049        # * A month and day value, with a zero year, e.g. an anniversary
1050        # * A year on its own, with zero month and day values
1051        # * A year and month value, with a zero day, e.g. a credit card expiration date
1052        #
1053        # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
1054      "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
1055          # month and day.
1056      "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
1057          # if specifying a year by itself or a year and month where the day is not
1058          # significant.
1059      "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
1060          # a year.
1061    },
1062    "state": "A String", # Status of this course work.
1063        # If unspecified, the default state is `DRAFT`.
1064    "dueTime": { # Represents a time of day. The date and time zone are either not significant # Optional time of day, in UTC, that submissions for this course work
1065        # are due.
1066        # This must be specified if `due_date` is specified.
1067        # or are specified elsewhere. An API may choose to allow leap seconds. Related
1068        # types are google.type.Date and `google.protobuf.Timestamp`.
1069      "hours": 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
1070          # to allow the value "24:00:00" for scenarios like business closing time.
1071      "nanos": 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
1072      "minutes": 42, # Minutes of hour of day. Must be from 0 to 59.
1073      "seconds": 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may
1074          # allow the value 60 if it allows leap-seconds.
1075    },
1076    "topicId": "A String", # Identifier for the topic that this coursework is associated with.
1077        # Must match an existing topic in the course.
1078    "description": "A String", # Optional description of this course work.
1079        # If set, the description must be a valid UTF-8 string containing no more
1080        # than 30,000 characters.
1081    "assignment": { # Additional details for assignments. # Assignment details.
1082        # This is populated only when `work_type` is `ASSIGNMENT`.
1083        #
1084        # Read-only.
1085      "studentWorkFolder": { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed.
1086          # This is only populated for course teachers and administrators.
1087        "alternateLink": "A String", # URL that can be used to access the Drive folder.
1088            #
1089            # Read-only.
1090        "id": "A String", # Drive API resource ID.
1091        "title": "A String", # Title of the Drive folder.
1092            #
1093            # Read-only.
1094      },
1095    },
1096    "scheduledTime": "A String", # Optional timestamp when this course work is scheduled to be published.
1097    "associatedWithDeveloper": True or False, # Whether this course work item is associated with the Developer Console
1098        # project making the request.
1099        #
1100        # See google.classroom.Work.CreateCourseWork for more
1101        # details.
1102        #
1103        # Read-only.
1104    "maxPoints": 3.14, # Maximum grade for this course work.
1105        # If zero or unspecified, this assignment is considered ungraded.
1106        # This must be a non-negative integer value.
1107    "workType": "A String", # Type of this course work.
1108        #
1109        # The type is set when the course work is created and cannot be changed.
1110    "alternateLink": "A String", # Absolute link to this course work in the Classroom web UI.
1111        # This is only populated if `state` is `PUBLISHED`.
1112        #
1113        # Read-only.
1114    "title": "A String", # Title of this course work.
1115        # The title must be a valid UTF-8 string containing between 1 and 3000
1116        # characters.
1117    "creationTime": "A String", # Timestamp when this course work was created.
1118        #
1119        # Read-only.
1120    "materials": [ # Additional materials.
1121        #
1122        # CourseWork must have no more than 20 material items.
1123      { # Material attached to course work.
1124          #
1125          # When creating attachments, setting the `form` field is not supported.
1126        "youtubeVideo": { # YouTube video item. # YouTube video material.
1127          "alternateLink": "A String", # URL that can be used to view the YouTube video.
1128              #
1129              # Read-only.
1130          "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video.
1131              #
1132              # Read-only.
1133          "id": "A String", # YouTube API resource ID.
1134          "title": "A String", # Title of the YouTube video.
1135              #
1136              # Read-only.
1137        },
1138        "driveFile": { # Drive file that is used as material for course work. # Google Drive file material.
1139          "driveFile": { # Representation of a Google Drive file. # Drive file details.
1140            "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item.
1141                #
1142                # Read-only.
1143            "alternateLink": "A String", # URL that can be used to access the Drive item.
1144                #
1145                # Read-only.
1146            "id": "A String", # Drive API resource ID.
1147            "title": "A String", # Title of the Drive item.
1148                #
1149                # Read-only.
1150          },
1151          "shareMode": "A String", # Mechanism by which students access the Drive item.
1152        },
1153        "link": { # URL item. # Link material. On creation, will be upgraded to a more appropriate type
1154            # if possible, and this will be reflected in the response.
1155          "url": "A String", # URL to link to.
1156              # This must be a valid UTF-8 string containing between 1 and 2024 characters.
1157          "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL.
1158              #
1159              # Read-only.
1160          "title": "A String", # Title of the target of the URL.
1161              #
1162              # Read-only.
1163        },
1164        "form": { # Google Forms item. # Google Forms material.
1165          "formUrl": "A String", # URL of the form.
1166          "thumbnailUrl": "A String", # URL of a thumbnail image of the Form.
1167              #
1168              # Read-only.
1169          "responseUrl": "A String", # URL of the form responses document.
1170              # Only set if respsonses have been recorded and only when the
1171              # requesting user is an editor of the form.
1172              #
1173              # Read-only.
1174          "title": "A String", # Title of the Form.
1175              #
1176              # Read-only.
1177        },
1178      },
1179    ],
1180    "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the coursework.
1181        # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
1182        # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
1183        # specified in this field will be assigned the coursework.
1184        # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
1185      "studentIds": [ # Identifiers for the students that have access to the
1186          # coursework/announcement.
1187        "A String",
1188      ],
1189    },
1190    "multipleChoiceQuestion": { # Additional details for multiple-choice questions. # Multiple choice question details.
1191        # For read operations, this field is populated only when `work_type` is
1192        # `MULTIPLE_CHOICE_QUESTION`.
1193        # For write operations, this field must be specified when creating course
1194        # work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be
1195        # set otherwise.
1196      "choices": [ # Possible choices.
1197        "A String",
1198      ],
1199    },
1200  }</pre>
1201</div>
1202
1203<div class="method">
1204    <code class="details" id="patch">patch(courseId, id, body, updateMask=None, x__xgafv=None)</code>
1205  <pre>Updates one or more fields of a course work.
1206
1207See google.classroom.v1.CourseWork for details
1208of which fields may be updated and who may change them.
1209
1210This request must be made by the Developer Console project of the
1211[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
1212create the corresponding course work item.
1213
1214This method returns the following error codes:
1215
1216* `PERMISSION_DENIED` if the requesting developer project did not create
1217the corresponding course work, if the user is not permitted to make the
1218requested modification to the student submission, or for
1219access errors.
1220* `INVALID_ARGUMENT` if the request is malformed.
1221* `FAILED_PRECONDITION` if the requested course work has already been
1222deleted.
1223* `NOT_FOUND` if the requested course, course work, or student submission
1224does not exist.
1225
1226Args:
1227  courseId: string, Identifier of the course.
1228This identifier can be either the Classroom-assigned identifier or an
1229alias. (required)
1230  id: string, Identifier of the course work. (required)
1231  body: object, The request body. (required)
1232    The object takes the form of:
1233
1234{ # Course work created by a teacher for students of the course.
1235  "updateTime": "A String", # Timestamp of the most recent change to this course work.
1236      #
1237      # Read-only.
1238  "courseId": "A String", # Identifier of the course.
1239      #
1240      # Read-only.
1241  "assigneeMode": "A String", # Assignee mode of the coursework.
1242      # If unspecified, the default value is `ALL_STUDENTS`.
1243  "id": "A String", # Classroom-assigned identifier of this course work, unique per course.
1244      #
1245      # Read-only.
1246  "submissionModificationMode": "A String", # Setting to determine when students are allowed to modify submissions.
1247      # If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
1248  "creatorUserId": "A String", # Identifier for the user that created the coursework.
1249      #
1250      # Read-only.
1251  "dueDate": { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # Optional date, in UTC, that submissions for this course work are due.
1252      # This must be specified if `due_time` is specified.
1253      # and time zone are either specified elsewhere or are not significant. The date
1254      # is relative to the Proleptic Gregorian Calendar. This can represent:
1255      #
1256      # * A full date, with non-zero year, month and day values
1257      # * A month and day value, with a zero year, e.g. an anniversary
1258      # * A year on its own, with zero month and day values
1259      # * A year and month value, with a zero day, e.g. a credit card expiration date
1260      #
1261      # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
1262    "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
1263        # month and day.
1264    "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
1265        # if specifying a year by itself or a year and month where the day is not
1266        # significant.
1267    "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
1268        # a year.
1269  },
1270  "state": "A String", # Status of this course work.
1271      # If unspecified, the default state is `DRAFT`.
1272  "dueTime": { # Represents a time of day. The date and time zone are either not significant # Optional time of day, in UTC, that submissions for this course work
1273      # are due.
1274      # This must be specified if `due_date` is specified.
1275      # or are specified elsewhere. An API may choose to allow leap seconds. Related
1276      # types are google.type.Date and `google.protobuf.Timestamp`.
1277    "hours": 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
1278        # to allow the value "24:00:00" for scenarios like business closing time.
1279    "nanos": 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
1280    "minutes": 42, # Minutes of hour of day. Must be from 0 to 59.
1281    "seconds": 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may
1282        # allow the value 60 if it allows leap-seconds.
1283  },
1284  "topicId": "A String", # Identifier for the topic that this coursework is associated with.
1285      # Must match an existing topic in the course.
1286  "description": "A String", # Optional description of this course work.
1287      # If set, the description must be a valid UTF-8 string containing no more
1288      # than 30,000 characters.
1289  "assignment": { # Additional details for assignments. # Assignment details.
1290      # This is populated only when `work_type` is `ASSIGNMENT`.
1291      #
1292      # Read-only.
1293    "studentWorkFolder": { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed.
1294        # This is only populated for course teachers and administrators.
1295      "alternateLink": "A String", # URL that can be used to access the Drive folder.
1296          #
1297          # Read-only.
1298      "id": "A String", # Drive API resource ID.
1299      "title": "A String", # Title of the Drive folder.
1300          #
1301          # Read-only.
1302    },
1303  },
1304  "scheduledTime": "A String", # Optional timestamp when this course work is scheduled to be published.
1305  "associatedWithDeveloper": True or False, # Whether this course work item is associated with the Developer Console
1306      # project making the request.
1307      #
1308      # See google.classroom.Work.CreateCourseWork for more
1309      # details.
1310      #
1311      # Read-only.
1312  "maxPoints": 3.14, # Maximum grade for this course work.
1313      # If zero or unspecified, this assignment is considered ungraded.
1314      # This must be a non-negative integer value.
1315  "workType": "A String", # Type of this course work.
1316      #
1317      # The type is set when the course work is created and cannot be changed.
1318  "alternateLink": "A String", # Absolute link to this course work in the Classroom web UI.
1319      # This is only populated if `state` is `PUBLISHED`.
1320      #
1321      # Read-only.
1322  "title": "A String", # Title of this course work.
1323      # The title must be a valid UTF-8 string containing between 1 and 3000
1324      # characters.
1325  "creationTime": "A String", # Timestamp when this course work was created.
1326      #
1327      # Read-only.
1328  "materials": [ # Additional materials.
1329      #
1330      # CourseWork must have no more than 20 material items.
1331    { # Material attached to course work.
1332        #
1333        # When creating attachments, setting the `form` field is not supported.
1334      "youtubeVideo": { # YouTube video item. # YouTube video material.
1335        "alternateLink": "A String", # URL that can be used to view the YouTube video.
1336            #
1337            # Read-only.
1338        "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video.
1339            #
1340            # Read-only.
1341        "id": "A String", # YouTube API resource ID.
1342        "title": "A String", # Title of the YouTube video.
1343            #
1344            # Read-only.
1345      },
1346      "driveFile": { # Drive file that is used as material for course work. # Google Drive file material.
1347        "driveFile": { # Representation of a Google Drive file. # Drive file details.
1348          "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item.
1349              #
1350              # Read-only.
1351          "alternateLink": "A String", # URL that can be used to access the Drive item.
1352              #
1353              # Read-only.
1354          "id": "A String", # Drive API resource ID.
1355          "title": "A String", # Title of the Drive item.
1356              #
1357              # Read-only.
1358        },
1359        "shareMode": "A String", # Mechanism by which students access the Drive item.
1360      },
1361      "link": { # URL item. # Link material. On creation, will be upgraded to a more appropriate type
1362          # if possible, and this will be reflected in the response.
1363        "url": "A String", # URL to link to.
1364            # This must be a valid UTF-8 string containing between 1 and 2024 characters.
1365        "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL.
1366            #
1367            # Read-only.
1368        "title": "A String", # Title of the target of the URL.
1369            #
1370            # Read-only.
1371      },
1372      "form": { # Google Forms item. # Google Forms material.
1373        "formUrl": "A String", # URL of the form.
1374        "thumbnailUrl": "A String", # URL of a thumbnail image of the Form.
1375            #
1376            # Read-only.
1377        "responseUrl": "A String", # URL of the form responses document.
1378            # Only set if respsonses have been recorded and only when the
1379            # requesting user is an editor of the form.
1380            #
1381            # Read-only.
1382        "title": "A String", # Title of the Form.
1383            #
1384            # Read-only.
1385      },
1386    },
1387  ],
1388  "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the coursework.
1389      # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
1390      # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
1391      # specified in this field will be assigned the coursework.
1392      # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
1393    "studentIds": [ # Identifiers for the students that have access to the
1394        # coursework/announcement.
1395      "A String",
1396    ],
1397  },
1398  "multipleChoiceQuestion": { # Additional details for multiple-choice questions. # Multiple choice question details.
1399      # For read operations, this field is populated only when `work_type` is
1400      # `MULTIPLE_CHOICE_QUESTION`.
1401      # For write operations, this field must be specified when creating course
1402      # work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be
1403      # set otherwise.
1404    "choices": [ # Possible choices.
1405      "A String",
1406    ],
1407  },
1408}
1409
1410  updateMask: string, Mask that identifies which fields on the course work to update.
1411This field is required to do an update. The update fails if invalid
1412fields are specified. If a field supports empty values, it can be cleared
1413by specifying it in the update mask and not in the CourseWork object. If a
1414field that does not support empty values is included in the update mask and
1415not set in the CourseWork object, an `INVALID_ARGUMENT` error will be
1416returned.
1417
1418The following fields may be specified by teachers:
1419
1420* `title`
1421* `description`
1422* `state`
1423* `due_date`
1424* `due_time`
1425* `max_points`
1426* `scheduled_time`
1427* `submission_modification_mode`
1428* `topic_id`
1429  x__xgafv: string, V1 error format.
1430    Allowed values
1431      1 - v1 error format
1432      2 - v2 error format
1433
1434Returns:
1435  An object of the form:
1436
1437    { # Course work created by a teacher for students of the course.
1438    "updateTime": "A String", # Timestamp of the most recent change to this course work.
1439        #
1440        # Read-only.
1441    "courseId": "A String", # Identifier of the course.
1442        #
1443        # Read-only.
1444    "assigneeMode": "A String", # Assignee mode of the coursework.
1445        # If unspecified, the default value is `ALL_STUDENTS`.
1446    "id": "A String", # Classroom-assigned identifier of this course work, unique per course.
1447        #
1448        # Read-only.
1449    "submissionModificationMode": "A String", # Setting to determine when students are allowed to modify submissions.
1450        # If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
1451    "creatorUserId": "A String", # Identifier for the user that created the coursework.
1452        #
1453        # Read-only.
1454    "dueDate": { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # Optional date, in UTC, that submissions for this course work are due.
1455        # This must be specified if `due_time` is specified.
1456        # and time zone are either specified elsewhere or are not significant. The date
1457        # is relative to the Proleptic Gregorian Calendar. This can represent:
1458        #
1459        # * A full date, with non-zero year, month and day values
1460        # * A month and day value, with a zero year, e.g. an anniversary
1461        # * A year on its own, with zero month and day values
1462        # * A year and month value, with a zero day, e.g. a credit card expiration date
1463        #
1464        # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
1465      "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
1466          # month and day.
1467      "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
1468          # if specifying a year by itself or a year and month where the day is not
1469          # significant.
1470      "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
1471          # a year.
1472    },
1473    "state": "A String", # Status of this course work.
1474        # If unspecified, the default state is `DRAFT`.
1475    "dueTime": { # Represents a time of day. The date and time zone are either not significant # Optional time of day, in UTC, that submissions for this course work
1476        # are due.
1477        # This must be specified if `due_date` is specified.
1478        # or are specified elsewhere. An API may choose to allow leap seconds. Related
1479        # types are google.type.Date and `google.protobuf.Timestamp`.
1480      "hours": 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
1481          # to allow the value "24:00:00" for scenarios like business closing time.
1482      "nanos": 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
1483      "minutes": 42, # Minutes of hour of day. Must be from 0 to 59.
1484      "seconds": 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may
1485          # allow the value 60 if it allows leap-seconds.
1486    },
1487    "topicId": "A String", # Identifier for the topic that this coursework is associated with.
1488        # Must match an existing topic in the course.
1489    "description": "A String", # Optional description of this course work.
1490        # If set, the description must be a valid UTF-8 string containing no more
1491        # than 30,000 characters.
1492    "assignment": { # Additional details for assignments. # Assignment details.
1493        # This is populated only when `work_type` is `ASSIGNMENT`.
1494        #
1495        # Read-only.
1496      "studentWorkFolder": { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed.
1497          # This is only populated for course teachers and administrators.
1498        "alternateLink": "A String", # URL that can be used to access the Drive folder.
1499            #
1500            # Read-only.
1501        "id": "A String", # Drive API resource ID.
1502        "title": "A String", # Title of the Drive folder.
1503            #
1504            # Read-only.
1505      },
1506    },
1507    "scheduledTime": "A String", # Optional timestamp when this course work is scheduled to be published.
1508    "associatedWithDeveloper": True or False, # Whether this course work item is associated with the Developer Console
1509        # project making the request.
1510        #
1511        # See google.classroom.Work.CreateCourseWork for more
1512        # details.
1513        #
1514        # Read-only.
1515    "maxPoints": 3.14, # Maximum grade for this course work.
1516        # If zero or unspecified, this assignment is considered ungraded.
1517        # This must be a non-negative integer value.
1518    "workType": "A String", # Type of this course work.
1519        #
1520        # The type is set when the course work is created and cannot be changed.
1521    "alternateLink": "A String", # Absolute link to this course work in the Classroom web UI.
1522        # This is only populated if `state` is `PUBLISHED`.
1523        #
1524        # Read-only.
1525    "title": "A String", # Title of this course work.
1526        # The title must be a valid UTF-8 string containing between 1 and 3000
1527        # characters.
1528    "creationTime": "A String", # Timestamp when this course work was created.
1529        #
1530        # Read-only.
1531    "materials": [ # Additional materials.
1532        #
1533        # CourseWork must have no more than 20 material items.
1534      { # Material attached to course work.
1535          #
1536          # When creating attachments, setting the `form` field is not supported.
1537        "youtubeVideo": { # YouTube video item. # YouTube video material.
1538          "alternateLink": "A String", # URL that can be used to view the YouTube video.
1539              #
1540              # Read-only.
1541          "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video.
1542              #
1543              # Read-only.
1544          "id": "A String", # YouTube API resource ID.
1545          "title": "A String", # Title of the YouTube video.
1546              #
1547              # Read-only.
1548        },
1549        "driveFile": { # Drive file that is used as material for course work. # Google Drive file material.
1550          "driveFile": { # Representation of a Google Drive file. # Drive file details.
1551            "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item.
1552                #
1553                # Read-only.
1554            "alternateLink": "A String", # URL that can be used to access the Drive item.
1555                #
1556                # Read-only.
1557            "id": "A String", # Drive API resource ID.
1558            "title": "A String", # Title of the Drive item.
1559                #
1560                # Read-only.
1561          },
1562          "shareMode": "A String", # Mechanism by which students access the Drive item.
1563        },
1564        "link": { # URL item. # Link material. On creation, will be upgraded to a more appropriate type
1565            # if possible, and this will be reflected in the response.
1566          "url": "A String", # URL to link to.
1567              # This must be a valid UTF-8 string containing between 1 and 2024 characters.
1568          "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL.
1569              #
1570              # Read-only.
1571          "title": "A String", # Title of the target of the URL.
1572              #
1573              # Read-only.
1574        },
1575        "form": { # Google Forms item. # Google Forms material.
1576          "formUrl": "A String", # URL of the form.
1577          "thumbnailUrl": "A String", # URL of a thumbnail image of the Form.
1578              #
1579              # Read-only.
1580          "responseUrl": "A String", # URL of the form responses document.
1581              # Only set if respsonses have been recorded and only when the
1582              # requesting user is an editor of the form.
1583              #
1584              # Read-only.
1585          "title": "A String", # Title of the Form.
1586              #
1587              # Read-only.
1588        },
1589      },
1590    ],
1591    "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the coursework.
1592        # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
1593        # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
1594        # specified in this field will be assigned the coursework.
1595        # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
1596      "studentIds": [ # Identifiers for the students that have access to the
1597          # coursework/announcement.
1598        "A String",
1599      ],
1600    },
1601    "multipleChoiceQuestion": { # Additional details for multiple-choice questions. # Multiple choice question details.
1602        # For read operations, this field is populated only when `work_type` is
1603        # `MULTIPLE_CHOICE_QUESTION`.
1604        # For write operations, this field must be specified when creating course
1605        # work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be
1606        # set otherwise.
1607      "choices": [ # Possible choices.
1608        "A String",
1609      ],
1610    },
1611  }</pre>
1612</div>
1613
1614</body></html>