Documentation

Google_Service_Classroom_Resource_CoursesCourseWorkStudentSubmissions extends Google_Service_Resource
in package

The "studentSubmissions" collection of methods.

Typical usage is: $classroomService = new Google_Service_Classroom(...); $studentSubmissions = $classroomService->studentSubmissions;

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.
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
get()  : Google_Service_Classroom_StudentSubmission
Returns a student submission. * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, course work, or student submission or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. (studentSubmissions.get)
listCoursesCourseWorkStudentSubmissions()  : Google_Service_Classroom_ListStudentSubmissionsResponse
Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request. `-` may be specified as the `course_work_id` to include student submissions for multiple course work items. Course students may only view their own work. Course teachers and domain administrators may view all student submissions. 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 does not exist.
modifyAttachments()  : Google_Service_Classroom_StudentSubmission
Modifies attachments of student submission. Attachments may only be added to student submissions belonging to course work objects with a `workType` of `ASSIGNMENT`. 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 user is not permitted to access the requested course or course work, if the user is not permitted to modify attachments on the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. (studentSubmissions.modifyAttachments)
patch()  : Google_Service_Classroom_StudentSubmission
Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission 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. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
reclaim()  : Google_Service_Classroom_ClassroomEmpty
Reclaims a student submission on behalf of the student that owns it.
returnCoursesCourseWorkStudentSubmissions()  : Google_Service_Classroom_ClassroomEmpty
Returns a student submission. Returning a student submission transfers ownership of attached Drive files to the student and may also update the submission state. Unlike the Classroom application, returning a student submission does not set assignedGrade to the draftGrade value. Only a teacher of the course that contains the requested student submission may call this method. 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 user is not permitted to access the requested course or course work, return the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
turnIn()  : Google_Service_Classroom_ClassroomEmpty
Turns in a student submission. Turning in a student submission transfers ownership of attached Drive files to the teacher and may also update the submission state. This may only be called by the student that owns the specified student submission. 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 user is not permitted to access the requested course or course work, turn in the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. (studentSubmissions.turnIn)
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$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
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

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
static
Return values
string

$requestUrl

get()

Returns a student submission. * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, course work, or student submission or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. (studentSubmissions.get)

public get(string $courseId, string $courseWorkId, string $id[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_StudentSubmission
Parameters
$courseId : string

Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

$courseWorkId : string

Identifier of the course work.

$id : string

Identifier of the student submission.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Classroom_StudentSubmission

listCoursesCourseWorkStudentSubmissions()

Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request. `-` may be specified as the `course_work_id` to include student submissions for multiple course work items. Course students may only view their own work. Course teachers and domain administrators may view all student submissions. 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 does not exist.

public listCoursesCourseWorkStudentSubmissions(string $courseId, string $courseWorkId[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_ListStudentSubmissionsResponse

(studentSubmissions.listCoursesCourseWorkStudentSubmissions)

Parameters
$courseId : string

Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

$courseWorkId : string

Identifier of the student work to request. This may be set to the string literal "-" to request student work for all course work in the specified course.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string pageToken nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token.

opt_param

string userId Optional argument to restrict returned student work to those owned by the student with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal "me", indicating the requesting user

opt_param

string states Requested submission states. If specified, returned student submissions match one of the specified submission states.

opt_param

int pageSize Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results.

opt_param

string late Requested lateness value. If specified, returned student submissions are restricted by the requested value. If unspecified, submissions are returned regardless of late value.

Return values
Google_Service_Classroom_ListStudentSubmissionsResponse

modifyAttachments()

Modifies attachments of student submission. Attachments may only be added to student submissions belonging to course work objects with a `workType` of `ASSIGNMENT`. 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 user is not permitted to access the requested course or course work, if the user is not permitted to modify attachments on the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. (studentSubmissions.modifyAttachments)

public modifyAttachments(string $courseId, string $courseWorkId, string $id, Google_Service_Classroom_ModifyAttachmentsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_StudentSubmission
Parameters
$courseId : string

Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

$courseWorkId : string

Identifier of the course work.

$id : string

Identifier of the student submission.

$postBody : Google_Service_Classroom_ModifyAttachmentsRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Classroom_StudentSubmission

patch()

Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission 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. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.

public patch(string $courseId, string $courseWorkId, string $id, Google_Service_Classroom_StudentSubmission $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_StudentSubmission

(studentSubmissions.patch)

Parameters
$courseId : string

Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

$courseWorkId : string

Identifier of the course work.

$id : string

Identifier of the student submission.

$postBody : Google_Service_Classroom_StudentSubmission
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string updateMask Mask that identifies which fields on the student submission to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields may be specified by teachers: * draft_grade * assigned_grade

Return values
Google_Service_Classroom_StudentSubmission

reclaim()

Reclaims a student submission on behalf of the student that owns it.

public reclaim(string $courseId, string $courseWorkId, string $id, Google_Service_Classroom_ReclaimStudentSubmissionRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_ClassroomEmpty

Reclaiming a student submission transfers ownership of attached Drive files to the student and updates the submission state. Only the student that owns the requested student submission may call this method, and only for a student submission that has been turned in. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to access the requested course or course work, unsubmit the requested student submission, or for access errors. * FAILED_PRECONDITION if the student submission has not been turned in. * INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if the requested course, course work, or student submission does not exist. (studentSubmissions.reclaim)

Parameters
$courseId : string

Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

$courseWorkId : string

Identifier of the course work.

$id : string

Identifier of the student submission.

$postBody : Google_Service_Classroom_ReclaimStudentSubmissionRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Classroom_ClassroomEmpty

returnCoursesCourseWorkStudentSubmissions()

Returns a student submission. Returning a student submission transfers ownership of attached Drive files to the student and may also update the submission state. Unlike the Classroom application, returning a student submission does not set assignedGrade to the draftGrade value. Only a teacher of the course that contains the requested student submission may call this method. 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 user is not permitted to access the requested course or course work, return the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.

public returnCoursesCourseWorkStudentSubmissions(string $courseId, string $courseWorkId, string $id, Google_Service_Classroom_ReturnStudentSubmissionRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Classroom_ClassroomEmpty

(studentSubmissions.returnCoursesCourseWorkStudentSubmissions)

Parameters
$courseId : string

Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

$courseWorkId : string

Identifier of the course work.

$id : string

Identifier of the student submission.

$postBody : Google_Service_Classroom_ReturnStudentSubmissionRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Classroom_ClassroomEmpty

turnIn()

Turns in a student submission. Turning in a student submission transfers ownership of attached Drive files to the teacher and may also update the submission state. This may only be called by the student that owns the specified student submission. 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 user is not permitted to access the requested course or course work, turn in the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. (studentSubmissions.turnIn)

public turnIn(string $courseId, string $courseWorkId, string $id, Google_Service_Classroom_TurnInStudentSubmissionRequest $postBody[, 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.

$courseWorkId : string

Identifier of the course work.

$id : string

Identifier of the student submission.

$postBody : Google_Service_Classroom_TurnInStudentSubmissionRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Classroom_ClassroomEmpty

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results