CoursesCourseWorkMaterials
class CoursesCourseWorkMaterials extends Resource (View source)
The "courseWorkMaterials" collection of methods.
Typical usage is:
$classroomService = new Google\Service\Classroom(...);
$courseWorkMaterials = $classroomService->courses_courseWorkMaterials;
Methods
Creates a course work material. This method returns the following error
codes: PERMISSION_DENIED
if the requesting user is not permitted to
access the requested course, create course work material in the requested
course, share a Drive attachment, or for access errors. INVALID_ARGUMENT
if the request is malformed or if more than 20 materials are provided.
NOT_FOUND
if the requested course does not exist. FAILED_PRECONDITION
for the following request error: AttachmentNotVisible
(courseWorkMaterials.create)
Deletes a course work material. This request must be made by the Developer
Console project of the OAuth client
ID used to create the
corresponding course work material item. This method returns the following
error codes: PERMISSION_DENIED
if the requesting developer project did
not create the corresponding course work material, if the requesting user is
not permitted to delete the requested course or for access errors.
FAILED_PRECONDITION
if the requested course work material has already been
deleted. * NOT_FOUND
if no course exists with the requested ID.
Returns a course work material. This method returns the following error
codes: PERMISSION_DENIED
if the requesting user is not permitted to
access the requested course or course work material, or for access errors.
INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the
requested course or course work material does not exist.
Gets metadata for Classroom add-ons in the context of a specific post. To
maintain the integrity of its own data and permissions model, an add-on
should call this to validate query parameters and the requesting user's role
whenever the add-on is opened in an
iframe. This method returns the following error
codes: PERMISSION_DENIED
for access errors. INVALID_ARGUMENT
if the
request is malformed. * NOT_FOUND
if one of the identified resources does
not exist. (courseWorkMaterials.getAddOnContext)
Returns a list of course work material that the requester is permitted to
view. Course students may only view PUBLISHED
course work material. Course
teachers and domain administrators may view all course work material. 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.
Updates one or more fields of a course work material. This method returns the
following error codes: PERMISSION_DENIED
if the requesting developer
project for access errors. INVALID_ARGUMENT
if the request is malformed.
Details
CourseWorkMaterial
create(string $courseId, CourseWorkMaterial $postBody, array $optParams = [])
Creates a course work material. This method returns the following error
codes: PERMISSION_DENIED
if the requesting user is not permitted to
access the requested course, create course work material in the requested
course, share a Drive attachment, or for access errors. INVALID_ARGUMENT
if the request is malformed or if more than 20 materials are provided.
NOT_FOUND
if the requested course does not exist. FAILED_PRECONDITION
for the following request error: AttachmentNotVisible
(courseWorkMaterials.create)
ClassroomEmpty
delete(string $courseId, string $id, array $optParams = [])
Deletes a course work material. This request must be made by the Developer
Console project of the OAuth client
ID used to create the
corresponding course work material item. This method returns the following
error codes: PERMISSION_DENIED
if the requesting developer project did
not create the corresponding course work material, if the requesting user is
not permitted to delete the requested course or for access errors.
FAILED_PRECONDITION
if the requested course work material has already been
deleted. * NOT_FOUND
if no course exists with the requested ID.
(courseWorkMaterials.delete)
CourseWorkMaterial
get(string $courseId, string $id, array $optParams = [])
Returns a course work material. This method returns the following error
codes: PERMISSION_DENIED
if the requesting user is not permitted to
access the requested course or course work material, or for access errors.
INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the
requested course or course work material does not exist.
(courseWorkMaterials.get)
AddOnContext
getAddOnContext(string $courseId, string $itemId, array $optParams = [])
Gets metadata for Classroom add-ons in the context of a specific post. To
maintain the integrity of its own data and permissions model, an add-on
should call this to validate query parameters and the requesting user's role
whenever the add-on is opened in an
iframe. This method returns the following error
codes: PERMISSION_DENIED
for access errors. INVALID_ARGUMENT
if the
request is malformed. * NOT_FOUND
if one of the identified resources does
not exist. (courseWorkMaterials.getAddOnContext)
ListCourseWorkMaterialResponse
listCoursesCourseWorkMaterials(string $courseId, array $optParams = [])
Returns a list of course work material that the requester is permitted to
view. Course students may only view PUBLISHED
course work material. Course
teachers and domain administrators may view all course work material. 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.
(courseWorkMaterials.listCoursesCourseWorkMaterials)
CourseWorkMaterial
patch(string $courseId, string $id, CourseWorkMaterial $postBody, array $optParams = [])
Updates one or more fields of a course work material. This method returns the
following error codes: PERMISSION_DENIED
if the requesting developer
project for access errors. INVALID_ARGUMENT
if the request is malformed.
FAILED_PRECONDITION
if the requested course work material has already been deleted. *NOT_FOUND
if the requested course or course work material does not exist (courseWorkMaterials.patch)