UVACanvasAccess
Public Member Functions | List of all members
UVACanvasAccess.Builders.AssignmentBuilder Class Reference

A class used to create or edit assignments using the builder pattern. When all desired fields are set, call Post to execute the operation. More...

Public Member Functions

AssignmentBuilder WithName (string name)
 The name of the assignment. More...
 
AssignmentBuilder WithPosition (int pos)
 The position of this assignment when displaying assignment lists. More...
 
AssignmentBuilder WithSubmissionTypes (SubmissionTypes types)
 The list of submission types supported for this assignment. More...
 
AssignmentBuilder WithAllowedExtensions (IEnumerable< string > extensions)
 Allowed file extensions for the SubmissionTypes.OnlineUpload submission type, if this assignment supports it. More...
 
AssignmentBuilder WithAllowedExtensions (params string[] extensions)
 Allowed file extensions for the SubmissionTypes.OnlineUpload submission type, if this assignment supports it. More...
 
AssignmentBuilder WithTurnitinEnabled (bool enabled=true)
 Enables Turnitin. More...
 
AssignmentBuilder WithVericiteEnabled (bool enabled=true)
 Enables Vericite. More...
 
AssignmentBuilder WithTurnitinSettings (TurnitinSettings settings)
 Settings for Turnitin, if it is enabled. More...
 
AssignmentBuilder WithSisIntegrationData (string sis)
 Data for SIS integration. More...
 
AssignmentBuilder WithIntegrationId (string id)
 Unique ID for third-party integrations. More...
 
AssignmentBuilder WithPeerReviews (bool enabled=true)
 Enables peer reviews. More...
 
AssignmentBuilder WithAutomaticPeerReviews (bool enabled=true)
 Enables automatically assigned peer reviews. More...
 
AssignmentBuilder WithUpdateNotification (bool enabled=true)
 Determines if Canvas notifies students when the content of this assignment changes. More...
 
AssignmentBuilder WithGroupCategoryId (ulong id)
 Assigns this assignment to a group. More...
 
AssignmentBuilder WithIndividualGroupGrading (bool enabled=true)
 If this is a group assignment, determines if grades are applied per-student or to the entire group. More...
 
AssignmentBuilder WithExternalToolTagAttribute (string tool)
 If this assignment supports SubmissionTypes.ExternalTool, sets the parameters of the external tool. More...
 
AssignmentBuilder WithPointsPossible (double points)
 The maximum amount of points that can be earned from this assignment. More...
 
AssignmentBuilder WithGradingType (GradingType type)
 The GradingType used for grading the assignment. More...
 
AssignmentBuilder WithDueDate (DateTime dateTime)
 The date/time when this assignment is due. More...
 
AssignmentBuilder WithLockDate (DateTime dateTime)
 The date/time when this assignment becomes unavailable. More...
 
AssignmentBuilder WithUnlockDate (DateTime dateTime)
 The date/time when this assignment becomes available. More...
 
AssignmentBuilder WithDescription (string description)
 The description of this assignment. More...
 
AssignmentBuilder WithAssignmentGroupId (ulong id)
 The assignment group to put this assignment into. More...
 
AssignmentBuilder Muted (bool enabled=true)
 Mutes this assignment. A muted assignment sends no notifications and hides grades from students. More...
 
AssignmentBuilder WithAssignmentOverrides (IEnumerable< AssignmentOverride > overrides)
 List of any overrides for this assignment. More...
 
AssignmentBuilder OnlyVisibleToOverrides (bool enabled=true)
 Determines if this assignment is only visible to overrides. More...
 
AssignmentBuilder Published (bool enabled=true)
 Determines if the assignment is published. More...
 
AssignmentBuilder WithGradingStandard (ulong id)
 The grading standard id to use. More...
 
AssignmentBuilder OmitFromFinalGrade (bool enabled=true)
 Omits this assignment from final grades. More...
 
AssignmentBuilder WithQuizLti (bool enabled=true)
 Determines if this assignment should use the Quizzes 2 LTI tool. More...
 
AssignmentBuilder WithModeratedGrading (bool enabled=true)
 Determines if this assignment is moderated. More...
 
AssignmentBuilder WithGraderCount (uint count)
 The maximum amount of personal graders who may issue grades for this assignment. More...
 
AssignmentBuilder WithFinalGrader (ulong id)
 If this is a moderated assignment, the grader responsible for choosing the final grade. More...
 
AssignmentBuilder WithGraderCommentsVisibleToGraders (bool enabled=true)
 If this is a moderated assignment, makes graders' comments visible to other graders. More...
 
AssignmentBuilder WithGradersAnonymousToGraders (bool enabled=true)
 If this is a moderated assignment, hides graders' names from other graders. More...
 
AssignmentBuilder WithGraderNamesVisibleToFinalGrader (bool enabled=true)
 If this is a moderated assignment, makes graders' names visible to the final grader. More...
 
AssignmentBuilder WithAnonymousGrading (bool enabled=true)
 Hides student identities from graders. More...
 
AssignmentBuilder WithAllowedAttempts (int count)
 The maximum number of submission attempts for this assignment. More...
 
Task< AssignmentPost ()
 Performs the operation using the fields in this builder. More...
 

Detailed Description

A class used to create or edit assignments using the builder pattern. When all desired fields are set, call Post to execute the operation.

Member Function Documentation

◆ Muted()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.Muted ( bool  enabled = true)
inline

Mutes this assignment. A muted assignment sends no notifications and hides grades from students.

Parameters
enabled
Returns
This builder.

◆ OmitFromFinalGrade()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.OmitFromFinalGrade ( bool  enabled = true)
inline

Omits this assignment from final grades.

Parameters
enabled
Returns
This builder.

◆ OnlyVisibleToOverrides()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.OnlyVisibleToOverrides ( bool  enabled = true)
inline

Determines if this assignment is only visible to overrides.

Parameters
enabled
Returns
This builder.

◆ Post()

Task<Assignment> UVACanvasAccess.Builders.AssignmentBuilder.Post ( )
inline

Performs the operation using the fields in this builder.

Returns
The newly created or edited assignment.

◆ Published()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.Published ( bool  enabled = true)
inline

Determines if the assignment is published.

Parameters
enabled
Returns
This builder.

◆ WithAllowedAttempts()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithAllowedAttempts ( int  count)
inline

The maximum number of submission attempts for this assignment.

Parameters
count
Returns
This builder.

A value of -1 indicates no limit.

◆ WithAllowedExtensions() [1/2]

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithAllowedExtensions ( IEnumerable< string >  extensions)
inline

Allowed file extensions for the SubmissionTypes.OnlineUpload submission type, if this assignment supports it.

Parameters
extensions
Returns
This builder.

◆ WithAllowedExtensions() [2/2]

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithAllowedExtensions ( params string[]  extensions)
inline

Allowed file extensions for the SubmissionTypes.OnlineUpload submission type, if this assignment supports it.

Parameters
extensions
Returns
This builder.

◆ WithAnonymousGrading()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithAnonymousGrading ( bool  enabled = true)
inline

Hides student identities from graders.

Parameters
enabled
Returns
This builder.

◆ WithAssignmentGroupId()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithAssignmentGroupId ( ulong  id)
inline

The assignment group to put this assignment into.

Parameters
id
Returns
This builder.

◆ WithAssignmentOverrides()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithAssignmentOverrides ( IEnumerable< AssignmentOverride overrides)
inline

List of any overrides for this assignment.

Parameters
overrides
Returns
This builder.

◆ WithAutomaticPeerReviews()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithAutomaticPeerReviews ( bool  enabled = true)
inline

Enables automatically assigned peer reviews.

Parameters
enabled
Returns
This builder.

Implies WithPeerReviews = true.

◆ WithDescription()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithDescription ( string  description)
inline

The description of this assignment.

Parameters
description
Returns
This builder.

◆ WithDueDate()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithDueDate ( DateTime  dateTime)
inline

The date/time when this assignment is due.

Parameters
dateTime
Returns
This builder.

When either WithUnlockDate or WithLockDate are specified, this must fall between them.

◆ WithExternalToolTagAttribute()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithExternalToolTagAttribute ( string  tool)
inline

If this assignment supports SubmissionTypes.ExternalTool, sets the parameters of the external tool.

Parameters
toolThe hash.
Returns
This builder.

◆ WithFinalGrader()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithFinalGrader ( ulong  id)
inline

If this is a moderated assignment, the grader responsible for choosing the final grade.

Parameters
id
Returns
This builder.

◆ WithGraderCommentsVisibleToGraders()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithGraderCommentsVisibleToGraders ( bool  enabled = true)
inline

If this is a moderated assignment, makes graders' comments visible to other graders.

Parameters
enabled
Returns
This builder.

◆ WithGraderCount()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithGraderCount ( uint  count)
inline

The maximum amount of personal graders who may issue grades for this assignment.

Parameters
count
Returns
This builder.

◆ WithGraderNamesVisibleToFinalGrader()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithGraderNamesVisibleToFinalGrader ( bool  enabled = true)
inline

If this is a moderated assignment, makes graders' names visible to the final grader.

Parameters
enabled
Returns
This builder.

◆ WithGradersAnonymousToGraders()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithGradersAnonymousToGraders ( bool  enabled = true)
inline

If this is a moderated assignment, hides graders' names from other graders.

Parameters
enabled
Returns
This builder.

◆ WithGradingStandard()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithGradingStandard ( ulong  id)
inline

The grading standard id to use.

Parameters
id
Returns
This builder.

◆ WithGradingType()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithGradingType ( GradingType  type)
inline

The GradingType used for grading the assignment.

Parameters
type
Returns
This builder.

If unspecified, this field defaults to GradingType.Points.

◆ WithGroupCategoryId()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithGroupCategoryId ( ulong  id)
inline

Assigns this assignment to a group.

Parameters
id
Returns
This builder.

◆ WithIndividualGroupGrading()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithIndividualGroupGrading ( bool  enabled = true)
inline

If this is a group assignment, determines if grades are applied per-student or to the entire group.

Parameters
enabled
Returns
This builder.

◆ WithIntegrationId()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithIntegrationId ( string  id)
inline

Unique ID for third-party integrations.

Parameters
id
Returns
This builder.

◆ WithLockDate()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithLockDate ( DateTime  dateTime)
inline

The date/time when this assignment becomes unavailable.

Parameters
dateTime
Returns
This builder.

When WithDueDate is specified, this must fall after it.

◆ WithModeratedGrading()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithModeratedGrading ( bool  enabled = true)
inline

Determines if this assignment is moderated.

Parameters
enabled
Returns
This builder.

◆ WithName()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithName ( string  name)
inline

The name of the assignment.

Parameters
name
Returns
This builder.

This field is required.

◆ WithPeerReviews()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithPeerReviews ( bool  enabled = true)
inline

Enables peer reviews.

Parameters
enabled
Returns
This builder.

Ignored if this assignment supports any of SubmissionTypes.ExternalTool, SubmissionTypes.DiscussionTopic, SubmissionTypes.OnlineQuiz, or SubmissionTypes.OnPaper.

◆ WithPointsPossible()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithPointsPossible ( double  points)
inline

The maximum amount of points that can be earned from this assignment.

Parameters
points
Returns
This builder.

◆ WithPosition()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithPosition ( int  pos)
inline

The position of this assignment when displaying assignment lists.

Parameters
pos
Returns
This builder.

◆ WithQuizLti()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithQuizLti ( bool  enabled = true)
inline

Determines if this assignment should use the Quizzes 2 LTI tool.

Parameters
enabled
Returns
This builder.

◆ WithSisIntegrationData()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithSisIntegrationData ( string  sis)
inline

Data for SIS integration.

Parameters
sis
Returns
This builder.

Requires that the current user is an admin.

◆ WithSubmissionTypes()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithSubmissionTypes ( SubmissionTypes  types)
inline

The list of submission types supported for this assignment.

Parameters
types
Returns
This builder.

If the assignment supports online submissions (not including SubmissionTypes.OnlineQuiz but including SubmissionTypes.MediaRecording), then multiple submission types are supported. Otherwise, only one submission type is supported. (See Edit an assignment for elaboration on this.)

◆ WithTurnitinEnabled()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithTurnitinEnabled ( bool  enabled = true)
inline

Enables Turnitin.

Parameters
enabled
Returns
This builder.

Enabling Turnitin requires that the assignment support the SubmissionTypes.OnlineUpload submission type, and that Turnitin is available for this course.

◆ WithTurnitinSettings()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithTurnitinSettings ( TurnitinSettings  settings)
inline

Settings for Turnitin, if it is enabled.

Parameters
settings
Returns
This builder.

◆ WithUnlockDate()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithUnlockDate ( DateTime  dateTime)
inline

The date/time when this assignment becomes available.

Parameters
dateTime
Returns
This builder.

When WithDueDate is specified, this must fall before it.

◆ WithUpdateNotification()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithUpdateNotification ( bool  enabled = true)
inline

Determines if Canvas notifies students when the content of this assignment changes.

Parameters
enabled
Returns
This builder.

◆ WithVericiteEnabled()

AssignmentBuilder UVACanvasAccess.Builders.AssignmentBuilder.WithVericiteEnabled ( bool  enabled = true)
inline

Enables Vericite.

Parameters
enabled
Returns
This builder.

Enabling Vericite requires that the assignment support the SubmissionTypes.OnlineUpload submission type, and that Vericite is available for this course.


The documentation for this class was generated from the following file: