Show / Hide Table of Contents

Class CoursesResource.CourseWorkResource

The "courseWork" collection of methods.

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

Constructors

CourseWorkResource(IClientService)

Constructs a new resource.

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

Properties

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.

System.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
System.String courseId

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

System.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
System.String courseId

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

System.String id

Identifier of the course work.

Returns
Type Description
CoursesResource.CourseWorkResource.GetRequest

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
System.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.

System.String courseId

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

System.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, course work, or student submission 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.

System.String courseId

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

System.String id

Identifier of the course work.

Returns
Type Description
CoursesResource.CourseWorkResource.PatchRequest
Back to top