Show / Hide Table of Contents

Class CoursesResource.CourseWorkResource

The "courseWork" collection of methods.

Inheritance
object
CoursesResource.CourseWorkResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Classroom.v1
Assembly: Google.Apis.Classroom.v1.dll
Syntax
public class CoursesResource.CourseWorkResource

Constructors

CourseWorkResource(IClientService)

Constructs a new resource.

Declaration
public CourseWorkResource(IClientService service)
Parameters
Type Name Description
IClientService service

Properties

AddOnAttachments

Gets the AddOnAttachments resource.

Declaration
public virtual CoursesResource.CourseWorkResource.AddOnAttachmentsResource AddOnAttachments { get; }
Property Value
Type Description
CoursesResource.CourseWorkResource.AddOnAttachmentsResource

Rubrics

Gets the Rubrics resource.

Declaration
public virtual CoursesResource.CourseWorkResource.RubricsResource Rubrics { get; }
Property Value
Type Description
CoursesResource.CourseWorkResource.RubricsResource

StudentSubmissions

Gets the StudentSubmissions resource.

Declaration
public virtual CoursesResource.CourseWorkResource.StudentSubmissionsResource StudentSubmissions { get; }
Property Value
Type Description
CoursesResource.CourseWorkResource.StudentSubmissionsResource

Methods

Create(CourseWork, string)

Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the OAuth client ID 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

Declaration
public virtual CoursesResource.CourseWorkResource.CreateRequest Create(CourseWork body, string courseId)
Parameters
Type Name Description
CourseWork body

The body of the request.

string courseId

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

Returns
Type Description
CoursesResource.CourseWorkResource.CreateRequest

Delete(string, string)

Deletes a course work. 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 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.

Declaration
public virtual CoursesResource.CourseWorkResource.DeleteRequest Delete(string courseId, string id)
Parameters
Type Name Description
string courseId

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

string id

Identifier of the course work to delete. This identifier is a Classroom-assigned identifier.

Returns
Type Description
CoursesResource.CourseWorkResource.DeleteRequest

Get(string, string)

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.

Declaration
public virtual CoursesResource.CourseWorkResource.GetRequest Get(string courseId, string id)
Parameters
Type Name Description
string courseId

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

string id

Identifier of the course work.

Returns
Type Description
CoursesResource.CourseWorkResource.GetRequest

GetAddOnContext(string, string)

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.

Declaration
public virtual CoursesResource.CourseWorkResource.GetAddOnContextRequest GetAddOnContext(string courseId, string itemId)
Parameters
Type Name Description
string courseId

Required. Identifier of the course.

string itemId

Identifier of the Announcement, CourseWork, or CourseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.

Returns
Type Description
CoursesResource.CourseWorkResource.GetAddOnContextRequest

List(string)

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.

Declaration
public virtual CoursesResource.CourseWorkResource.ListRequest List(string courseId)
Parameters
Type Name Description
string courseId

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

Returns
Type Description
CoursesResource.CourseWorkResource.ListRequest

ModifyAssignees(ModifyCourseWorkAssigneesRequest, string, string)

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.
Declaration
public virtual CoursesResource.CourseWorkResource.ModifyAssigneesRequest ModifyAssignees(ModifyCourseWorkAssigneesRequest body, string courseId, string id)
Parameters
Type Name Description
ModifyCourseWorkAssigneesRequest body

The body of the request.

string courseId

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

string id

Identifier of the coursework.

Returns
Type Description
CoursesResource.CourseWorkResource.ModifyAssigneesRequest

Patch(CourseWork, string, string)

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 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 or course work does not exist.

Declaration
public virtual CoursesResource.CourseWorkResource.PatchRequest Patch(CourseWork body, string courseId, string id)
Parameters
Type Name Description
CourseWork body

The body of the request.

string courseId

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

string id

Identifier of the course work.

Returns
Type Description
CoursesResource.CourseWorkResource.PatchRequest

UpdateRubric(Rubric, string, string)

Updates a rubric. See google.classroom.v1.Rubric for details of which fields can be updated. Rubric update capabilities are limited once grading has started. The requesting user and course owner must have rubrics creation capabilities. For details, see licensing requirements. This request must be made by the Google Cloud console of the OAuth client ID used to create the parent course work item. This method returns the following error codes: * PERMISSION_DENIED if the requesting developer project didn't create the corresponding course work, if the user isn't permitted to make the requested modification to the rubric, or for access errors. This error code is also returned if grading has already started on the rubric. * INVALID_ARGUMENT if the request is malformed and for the following request error: * RubricCriteriaInvalidFormat * NOT_FOUND if the requested course, course work, or rubric doesn't exist or if the user doesn't have access to the corresponding course work. * INTERNAL if grading has already started on the rubric.

Declaration
public virtual CoursesResource.CourseWorkResource.UpdateRubricRequest UpdateRubric(Rubric body, string courseId, string courseWorkId)
Parameters
Type Name Description
Rubric body

The body of the request.

string courseId

Required. Identifier of the course.

string courseWorkId

Required. Identifier of the course work.

Returns
Type Description
CoursesResource.CourseWorkResource.UpdateRubricRequest
In this article
Back to top Generated by DocFX