source: vendor/google/apiclient-services/src/Classroom/Resource/CoursesCourseWorkAddOnAttachmentsStudentSubmissions.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload new project files

  • Property mode set to 100644
File size: 4.6 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Classroom\Resource;
19
20use Google\Service\Classroom\AddOnAttachmentStudentSubmission;
21
22/**
23 * The "studentSubmissions" collection of methods.
24 * Typical usage is:
25 * <code>
26 * $classroomService = new Google\Service\Classroom(...);
27 * $studentSubmissions = $classroomService->courses_courseWork_addOnAttachments_studentSubmissions;
28 * </code>
29 */
30class CoursesCourseWorkAddOnAttachmentsStudentSubmissions extends \Google\Service\Resource
31{
32 /**
33 * Returns a student submission for an add-on attachment. This method returns
34 * the following error codes: * `PERMISSION_DENIED` for access errors. *
35 * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
36 * identified resources does not exist. (studentSubmissions.get)
37 *
38 * @param string $courseId Required. Identifier of the course.
39 * @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
40 * `CourseWorkMaterial` under which the attachment is attached. This field is
41 * required, but is not marked as such while we are migrating from post_id.
42 * @param string $attachmentId Required. Identifier of the attachment.
43 * @param string $submissionId Required. Identifier of the student’s submission.
44 * @param array $optParams Optional parameters.
45 *
46 * @opt_param string postId Optional. Deprecated, use `item_id` instead.
47 * @return AddOnAttachmentStudentSubmission
48 * @throws \Google\Service\Exception
49 */
50 public function get($courseId, $itemId, $attachmentId, $submissionId, $optParams = [])
51 {
52 $params = ['courseId' => $courseId, 'itemId' => $itemId, 'attachmentId' => $attachmentId, 'submissionId' => $submissionId];
53 $params = array_merge($params, $optParams);
54 return $this->call('get', [$params], AddOnAttachmentStudentSubmission::class);
55 }
56 /**
57 * Updates data associated with an add-on attachment submission. Requires the
58 * add-on to have been the original creator of the attachment and the attachment
59 * to have a positive `max_points` value set. This method returns the following
60 * error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if
61 * the request is malformed. * `NOT_FOUND` if one of the identified resources
62 * does not exist. (studentSubmissions.patch)
63 *
64 * @param string $courseId Required. Identifier of the course.
65 * @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
66 * `CourseWorkMaterial` under which the attachment is attached. This field is
67 * required, but is not marked as such while we are migrating from post_id.
68 * @param string $attachmentId Required. Identifier of the attachment.
69 * @param string $submissionId Required. Identifier of the student's submission.
70 * @param AddOnAttachmentStudentSubmission $postBody
71 * @param array $optParams Optional parameters.
72 *
73 * @opt_param string postId Optional. Deprecated, use `item_id` instead.
74 * @opt_param string updateMask Required. Mask that identifies which fields on
75 * the attachment to update. The update fails if invalid fields are specified.
76 * If a field supports empty values, it can be cleared by specifying it in the
77 * update mask and not in the `AddOnAttachmentStudentSubmission` object. The
78 * following fields may be specified by teachers: * `points_earned`
79 * @return AddOnAttachmentStudentSubmission
80 * @throws \Google\Service\Exception
81 */
82 public function patch($courseId, $itemId, $attachmentId, $submissionId, AddOnAttachmentStudentSubmission $postBody, $optParams = [])
83 {
84 $params = ['courseId' => $courseId, 'itemId' => $itemId, 'attachmentId' => $attachmentId, 'submissionId' => $submissionId, 'postBody' => $postBody];
85 $params = array_merge($params, $optParams);
86 return $this->call('patch', [$params], AddOnAttachmentStudentSubmission::class);
87 }
88}
89
90// Adding a class alias for backwards compatibility with the previous class name.
91class_alias(CoursesCourseWorkAddOnAttachmentsStudentSubmissions::class, 'Google_Service_Classroom_Resource_CoursesCourseWorkAddOnAttachmentsStudentSubmissions');
Note: See TracBrowser for help on using the repository browser.