Google_Service_Classroom_Resource_CoursesCourseWork
extends Google_Service_Resource
in package
The "courseWork" collection of methods.
Typical usage is:
$classroomService = new Google_Service_Classroom(...);
$courseWork = $classroomService->courseWork;
Table of Contents
- $client : Google_Client
- $methods : array<string|int, mixed>
- $resourceName : string
- $rootUrl : string
- $serviceName : string
- $servicePath : string
- $stackParameters : mixed
- __construct() : mixed
- call() : Google_Http_Request|expectedClass
- TODO: This function needs simplifying.
- create() : Google_Service_Classroom_CourseWork
- Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible (courseWork.create)
- createRequestUri() : string
- Parse/expand request parameters and create a fully qualified request uri.
- delete() : Google_Service_Classroom_ClassroomEmpty
- Deletes a course work. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if no course exists with the requested ID. (courseWork.delete)
- get() : Google_Service_Classroom_CourseWork
- Returns course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist. (courseWork.get)
- listCoursesCourseWork() : Google_Service_Classroom_ListCourseWorkResponse
- Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
- modifyAssignees() : Google_Service_Classroom_CourseWork
- Modifies assignee mode and options of a coursework. Only a teacher of the course that contains the coursework may call this method. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.
- patch() : Google_Service_Classroom_CourseWork
- Updates one or more fields of a course work. See google.classroom.v1.CourseWork for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
- convertToArrayAndStripNulls() : mixed
Properties
$client
private
Google_Client
$client
$methods
private
array<string|int, mixed>
$methods
$resourceName
private
string
$resourceName
$rootUrl
private
string
$rootUrl
$serviceName
private
string
$serviceName
$servicePath
private
string
$servicePath
$stackParameters
private
mixed
$stackParameters
= array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))
Methods
__construct()
public
__construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
- $service : mixed
- $serviceName : mixed
- $resourceName : mixed
- $resource : mixed
Return values
mixed —call()
TODO: This function needs simplifying.
public
call( $name, $arguments[, $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
Tags
Return values
Google_Http_Request|expectedClass —create()
Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible (courseWork.create)
public
create(string $courseId, Google_Service_Classroom_CourseWork $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_CourseWork
Parameters
- $courseId : string
-
Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
- $postBody : Google_Service_Classroom_CourseWork
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Classroom_CourseWork —createRequestUri()
Parse/expand request parameters and create a fully qualified request uri.
public
createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
- $restPath : string
- $params : array<string|int, mixed>
Tags
Return values
string —$requestUrl
delete()
Deletes a course work. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if no course exists with the requested ID. (courseWork.delete)
public
delete(string $courseId, string $id[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_ClassroomEmpty
Parameters
- $courseId : string
-
Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
- $id : string
-
Identifier of the course work to delete. This identifier is a Classroom-assigned identifier.
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Classroom_ClassroomEmpty —get()
Returns course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist. (courseWork.get)
public
get(string $courseId, string $id[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_CourseWork
Parameters
- $courseId : string
-
Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
- $id : string
-
Identifier of the course work.
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Classroom_CourseWork —listCoursesCourseWork()
Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
public
listCoursesCourseWork(string $courseId[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_ListCourseWorkResponse
(courseWork.listCoursesCourseWork)
Parameters
- $courseId : string
-
Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_Classroom_ListCourseWorkResponse —modifyAssignees()
Modifies assignee mode and options of a coursework. Only a teacher of the course that contains the coursework may call this method. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.
public
modifyAssignees(string $courseId, string $id, Google_Service_Classroom_ModifyCourseWorkAssigneesRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_CourseWork
(courseWork.modifyAssignees)
Parameters
- $courseId : string
-
Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
- $id : string
-
Identifier of the coursework.
- $postBody : Google_Service_Classroom_ModifyCourseWorkAssigneesRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Classroom_CourseWork —patch()
Updates one or more fields of a course work. See google.classroom.v1.CourseWork for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
public
patch(string $courseId, string $id, Google_Service_Classroom_CourseWork $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_CourseWork
(courseWork.patch)
Parameters
- $courseId : string
-
Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
- $id : string
-
Identifier of the course work.
- $postBody : Google_Service_Classroom_CourseWork
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_Classroom_CourseWork —convertToArrayAndStripNulls()
protected
convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
- $o : mixed