UVACanvasAccess
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
UVACanvasAccess.Builders.CourseBuilder Class Reference

Used to create or edit courses using the builder pattern. When all desired fields are set, call Post to execute the operation. More...

Public Types

enum  CourseEditAction : byte {
  Unpublish , Publish , Conclude , Delete ,
  Undelete
}
 Actions that can be taken when editing a course. More...
 
enum  GradePassbackSetting : byte { Unset , NightlySync , Disabled }
 Passback settings for grade sync. More...
 

Public Member Functions

CourseBuilder WithName (string name)
 The name of this course.
 
CourseBuilder WithCourseCode (string courseCode)
 The course code of this course.
 
CourseBuilder WithStartDate (DateTime start)
 The start date of this course.
 
CourseBuilder WithEndDate (DateTime end)
 The end date of this course.
 
CourseBuilder WithLicense (License license)
 The license type for this course.
 
CourseBuilder AsPublic (bool @public=true)
 Make the course visible to all unauthenticated or authenticated users.
 
CourseBuilder AsPublicToAuthUsers (bool publicToAuth=true)
 Make the course visible to all authenticated users.
 
CourseBuilder WithPublicSyllabus (bool publicSyllabus=true)
 Make the syllabus public.
 
CourseBuilder WithPublicSyllabusToAuthUsers (bool publicSyllabusToAuth=true)
 Make the syllabus public to authenticated users only.
 
CourseBuilder WithPublicDescription (string description)
 The course's public description.
 
CourseBuilder WithStudentWikiEditing (bool allowed=true)
 Allow students to edit the wiki.
 
CourseBuilder WithWikiComments (bool allowed=true)
 Allow wiki comments.
 
CourseBuilder WithStudentForumAttachments (bool allowed=true)
 Allow students to attach files to forum posts.
 
CourseBuilder WithOpenEnrollment (bool openEnrollment=true)
 Allow open enrollment.
 
CourseBuilder WithSelfEnrollment (bool selfEnrollment=true)
 Allow self enrollment.
 
CourseBuilder WithDateRestrictedEnrollments (bool restrict=true)
 Only allow enrollments between this course's start and end dates.
 
CourseBuilder WithAccountId (ulong accountId)
 Move this course to another account.
 
CourseBuilder WithTermId (ulong termId)
 The unique term id to create this course in.
 
CourseBuilder WithSisId (string sis)
 The course's SIS id.
 
CourseBuilder WithIntegrationId (string integration)
 The course's integration id.
 
CourseBuilder WithHiddenFinalGrades (bool hide=true)
 Hide final grades in the student summary.
 
CourseBuilder WithAssignmentGroupWeight (bool weight=true)
 Apply assigment group weighting to final grades.
 
CourseBuilder WithTimeZone (string timeZone)
 The time zone of this course.
 
CourseBuilder WithStorageQuotaMb (int quotaMb)
 Set the storage quota for this course, in megabytes.
 
CourseBuilder OfferImmediately (bool offerNow=true)
 Make this course available to students immediately.
 
CourseBuilder EnrollCurrentUser (bool enrollMe=true)
 Enroll the current user immediately as a teacher in this course.
 
CourseBuilder SkipCourseTemplate (bool skipTemplate=true)
 Whether to skip applying the account's course template to this course.
 
CourseBuilder WithDefaultView (CourseView defaultView)
 The course's default view.
 
CourseBuilder WithSyllabusBody (string body)
 The course syllabus.
 
CourseBuilder WithSyllabusCourseSummary (bool showSummary=true)
 Whether to the course summary on the syllabus page.
 
CourseBuilder WithGradingStandard (ulong standard)
 The grading standard for this course.
 
CourseBuilder WithGradePassbackSetting (GradePassbackSetting setting)
 The grade passback setting for this course.
 
CourseBuilder WithCourseFormat (CourseFormat format)
 The course format.
 
CourseBuilder WithManualGradePosting (bool postManually=true)
 Whether to require grades to be posted manually in this course.
 
CourseBuilder WithImageId (ulong imageId)
 Sets a course image using a file id in the course.
 
CourseBuilder WithImageUrl (string imageUrl)
 Sets a course image using a URL.
 
CourseBuilder WithRemoveImage (bool remove=true)
 Remove the course image.
 
CourseBuilder WithRemoveBannerImage (bool remove=true)
 Remove the course banner image.
 
CourseBuilder WithBlueprint (bool blueprint=true)
 Sets this course as a blueprint course.
 
CourseBuilder WithBlueprintRestriction (BlueprintRestrictionType restriction, bool enabled=true)
 Sets a blueprint restriction for this course.
 
CourseBuilder WithBlueprintRestrictions (BlueprintRestrictionTypes restrictions)
 Sets blueprint restrictions for this course.
 
CourseBuilder WithUseBlueprintRestrictionsByObjectType (bool enabled=true)
 Use object-type specific blueprint restrictions.
 
CourseBuilder WithBlueprintRestrictionByObjectType (BlueprintAssetType objectType, BlueprintRestrictionType restriction, bool enabled=true)
 Sets a blueprint restriction by object type.
 
CourseBuilder WithBlueprintRestrictionsByObjectType (Dictionary< BlueprintAssetType, BlueprintRestrictionTypes > restrictionsByObjectType)
 Sets blueprint restrictions by object type.
 
CourseBuilder WithHomeroomCourse (bool homeroom=true)
 Sets this course as a homeroom course.
 
CourseBuilder WithSyncEnrollmentsFromHomeroom (bool setting=true)
 Sync enrollments from the homeroom course.
 
CourseBuilder WithHomeroomCourseId (string homeroomCourseId)
 Sets the homeroom course id for enrollment sync.
 
CourseBuilder WithTemplate (bool template=true)
 Enable or disable this course as a template.
 
CourseBuilder WithCourseColor (string hexColor)
 Sets the course color (hex).
 
CourseBuilder WithFriendlyName (string friendlyName)
 Set a friendly name for the course.
 
CourseBuilder WithCoursePacingEnabled (bool enabled=true)
 Enable or disable Course Pacing.
 
CourseBuilder WithConditionalRelease (bool enabled=true)
 Enable or disable conditional release.
 
CourseBuilder TryToRecoverFromSis (bool tryToRecover=true)
 Try to recover a deleted course from SIS with a matching SIS id before creating this course.
 
CourseBuilder WithOverrideSisStickiness (bool overrideStickiness=true)
 Override SIS stickiness.
 
CourseBuilder TakeAction (CourseEditAction action)
 Perform the action indicated by action when editing a course; publish, unpublish, conclude, delete, or undelete the course.
 
Task< CoursePost ()
 Commit the operation using the fields in this builder.
 

Detailed Description

Used to create or edit courses using the builder pattern. When all desired fields are set, call Post to execute the operation.

Member Enumeration Documentation

◆ CourseEditAction

Actions that can be taken when editing a course.

Enumerator
Unpublish 

Make the course invisible to students. Depending on the state of the course, this action may not be possible.

This is sometimes called 'claim' internally.

Publish 

Make the course visible to students. Depending on the state of the course, this action may irreversible.

This is sometimes called 'offer' internally.

Conclude 

Conclude the course.

Delete 

Delete the course.

Undelete 

Undelete the course. This action may not be possible.

◆ GradePassbackSetting

Passback settings for grade sync.

Enumerator
Unset 

Unset the grade passback setting.

NightlySync 

Enable nightly sync.

Disabled 

Disable grade passback.

Member Function Documentation

◆ AsPublic()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.AsPublic ( bool @  public = true)
inline

Make the course visible to all unauthenticated or authenticated users.

Parameters
public
Returns
This builder.

◆ AsPublicToAuthUsers()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.AsPublicToAuthUsers ( bool  publicToAuth = true)
inline

Make the course visible to all authenticated users.

Parameters
publicToAuth
Returns
This builder.

◆ EnrollCurrentUser()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.EnrollCurrentUser ( bool  enrollMe = true)
inline

Enroll the current user immediately as a teacher in this course.

Parameters
enrollMe
Returns
This builder.

◆ OfferImmediately()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.OfferImmediately ( bool  offerNow = true)
inline

Make this course available to students immediately.

Parameters
offerNow
Returns
This builder.

◆ Post()

Task< Course > UVACanvasAccess.Builders.CourseBuilder.Post ( )
inline

Commit the operation using the fields in this builder.

Returns
The newly created or edited course.

◆ SkipCourseTemplate()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.SkipCourseTemplate ( bool  skipTemplate = true)
inline

Whether to skip applying the account's course template to this course.

Parameters
skipTemplate
Returns
This builder.

◆ TakeAction()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.TakeAction ( CourseEditAction  action)
inline

Perform the action indicated by action when editing a course; publish, unpublish, conclude, delete, or undelete the course.

Parameters
actionWhat action to take.
Returns

Has no effect when creating a course.

◆ TryToRecoverFromSis()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.TryToRecoverFromSis ( bool  tryToRecover = true)
inline

Try to recover a deleted course from SIS with a matching SIS id before creating this course.

Parameters
tryToRecover
Returns
This builder.

◆ WithAccountId()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithAccountId ( ulong  accountId)
inline

Move this course to another account.

Parameters
accountId
Returns
This builder.

Has no effect when creating a course.

◆ WithAssignmentGroupWeight()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithAssignmentGroupWeight ( bool  weight = true)
inline

Apply assigment group weighting to final grades.

Parameters
weight
Returns
This builder.

◆ WithBlueprint()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithBlueprint ( bool  blueprint = true)
inline

Sets this course as a blueprint course.

Parameters
blueprint
Returns
This builder.

Has no effect when creating a course.

◆ WithBlueprintRestriction()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithBlueprintRestriction ( BlueprintRestrictionType  restriction,
bool  enabled = true 
)
inline

Sets a blueprint restriction for this course.

Parameters
restriction
enabled
Returns
This builder.

Has no effect when creating a course.

◆ WithBlueprintRestrictionByObjectType()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithBlueprintRestrictionByObjectType ( BlueprintAssetType  objectType,
BlueprintRestrictionType  restriction,
bool  enabled = true 
)
inline

Sets a blueprint restriction by object type.

Parameters
objectType
restriction
enabled
Returns
This builder.

Has no effect when creating a course.

◆ WithBlueprintRestrictions()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithBlueprintRestrictions ( BlueprintRestrictionTypes  restrictions)
inline

Sets blueprint restrictions for this course.

Parameters
restrictions
Returns
This builder.

Has no effect when creating a course.

◆ WithBlueprintRestrictionsByObjectType()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithBlueprintRestrictionsByObjectType ( Dictionary< BlueprintAssetType, BlueprintRestrictionTypes >  restrictionsByObjectType)
inline

Sets blueprint restrictions by object type.

Parameters
restrictionsByObjectType
Returns
This builder.

Has no effect when creating a course.

◆ WithConditionalRelease()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithConditionalRelease ( bool  enabled = true)
inline

Enable or disable conditional release.

Parameters
enabled
Returns
This builder.

Has no effect when creating a course.

◆ WithCourseCode()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithCourseCode ( string  courseCode)
inline

The course code of this course.

Parameters
courseCode
Returns
This builder.

◆ WithCourseColor()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithCourseColor ( string  hexColor)
inline

Sets the course color (hex).

Parameters
hexColor
Returns
This builder.

Has no effect when creating a course.

◆ WithCourseFormat()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithCourseFormat ( CourseFormat  format)
inline

The course format.

Parameters
format
Returns
This builder.

◆ WithCoursePacingEnabled()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithCoursePacingEnabled ( bool  enabled = true)
inline

Enable or disable Course Pacing.

Parameters
enabled
Returns
This builder.

Has no effect when creating a course.

◆ WithDateRestrictedEnrollments()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithDateRestrictedEnrollments ( bool  restrict = true)
inline

Only allow enrollments between this course's start and end dates.

Parameters
restrict
Returns
This builder.

◆ WithDefaultView()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithDefaultView ( CourseView  defaultView)
inline

The course's default view.

Parameters
defaultView
Returns
This builder.

◆ WithEndDate()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithEndDate ( DateTime  end)
inline

The end date of this course.

Parameters
end
Returns
This builder.

◆ WithFriendlyName()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithFriendlyName ( string  friendlyName)
inline

Set a friendly name for the course.

Parameters
friendlyName
Returns
This builder.

Has no effect when creating a course.

◆ WithGradePassbackSetting()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithGradePassbackSetting ( GradePassbackSetting  setting)
inline

The grade passback setting for this course.

Parameters
setting
Returns
This builder.

◆ WithGradingStandard()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithGradingStandard ( ulong  standard)
inline

The grading standard for this course.

Parameters
standard
Returns
This builder.

◆ WithHiddenFinalGrades()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithHiddenFinalGrades ( bool  hide = true)
inline

Hide final grades in the student summary.

Parameters
hide
Returns
This builder.

◆ WithHomeroomCourse()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithHomeroomCourse ( bool  homeroom = true)
inline

Sets this course as a homeroom course.

Parameters
homeroom
Returns
This builder.

Has no effect when creating a course.

◆ WithHomeroomCourseId()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithHomeroomCourseId ( string  homeroomCourseId)
inline

Sets the homeroom course id for enrollment sync.

Parameters
homeroomCourseId
Returns
This builder.

Has no effect when creating a course.

◆ WithImageId()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithImageId ( ulong  imageId)
inline

Sets a course image using a file id in the course.

Parameters
imageId
Returns
This builder.

Has no effect when creating a course.

◆ WithImageUrl()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithImageUrl ( string  imageUrl)
inline

Sets a course image using a URL.

Parameters
imageUrl
Returns
This builder.

Has no effect when creating a course.

◆ WithIntegrationId()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithIntegrationId ( string  integration)
inline

The course's integration id.

Parameters
integration
Returns
This builder.

◆ WithLicense()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithLicense ( License  license)
inline

The license type for this course.

Parameters
license
Returns
This builder.

◆ WithManualGradePosting()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithManualGradePosting ( bool  postManually = true)
inline

Whether to require grades to be posted manually in this course.

Parameters
postManually
Returns
This builder.

◆ WithName()

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

The name of this course.

Parameters
name
Returns
This builder.

◆ WithOpenEnrollment()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithOpenEnrollment ( bool  openEnrollment = true)
inline

Allow open enrollment.

Parameters
openEnrollment
Returns
This builder.

◆ WithOverrideSisStickiness()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithOverrideSisStickiness ( bool  overrideStickiness = true)
inline

Override SIS stickiness.

Parameters
overrideStickiness
Returns
This builder.

Has no effect when creating a course.

◆ WithPublicDescription()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithPublicDescription ( string  description)
inline

The course's public description.

Parameters
description
Returns
This builder.

◆ WithPublicSyllabus()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithPublicSyllabus ( bool  publicSyllabus = true)
inline

Make the syllabus public.

Parameters
publicSyllabus
Returns
This builder.

◆ WithPublicSyllabusToAuthUsers()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithPublicSyllabusToAuthUsers ( bool  publicSyllabusToAuth = true)
inline

Make the syllabus public to authenticated users only.

Parameters
publicSyllabusToAuth
Returns
This builder.

◆ WithRemoveBannerImage()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithRemoveBannerImage ( bool  remove = true)
inline

Remove the course banner image.

Parameters
remove
Returns
This builder.

Has no effect when creating a course.

◆ WithRemoveImage()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithRemoveImage ( bool  remove = true)
inline

Remove the course image.

Parameters
remove
Returns
This builder.

Has no effect when creating a course.

◆ WithSelfEnrollment()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithSelfEnrollment ( bool  selfEnrollment = true)
inline

Allow self enrollment.

Parameters
selfEnrollment
Returns
This builder.

◆ WithSisId()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithSisId ( string  sis)
inline

The course's SIS id.

Parameters
sis
Returns
This builder.

◆ WithStartDate()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithStartDate ( DateTime  start)
inline

The start date of this course.

Parameters
start
Returns
This builder.

◆ WithStorageQuotaMb()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithStorageQuotaMb ( int  quotaMb)
inline

Set the storage quota for this course, in megabytes.

Parameters
quotaMb
Returns
This builder.

Has no effect when creating a course.

◆ WithStudentForumAttachments()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithStudentForumAttachments ( bool  allowed = true)
inline

Allow students to attach files to forum posts.

Parameters
allowed
Returns
This builder.

◆ WithStudentWikiEditing()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithStudentWikiEditing ( bool  allowed = true)
inline

Allow students to edit the wiki.

Parameters
allowed
Returns
This builder.

◆ WithSyllabusBody()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithSyllabusBody ( string  body)
inline

The course syllabus.

Parameters
body
Returns
This builder.

◆ WithSyllabusCourseSummary()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithSyllabusCourseSummary ( bool  showSummary = true)
inline

Whether to the course summary on the syllabus page.

Parameters
showSummary
Returns
This builder.

Has no effect when creating a course.

◆ WithSyncEnrollmentsFromHomeroom()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithSyncEnrollmentsFromHomeroom ( bool  setting = true)
inline

Sync enrollments from the homeroom course.

Parameters
setting
Returns
This builder.

Has no effect when creating a course.

◆ WithTemplate()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithTemplate ( bool  template = true)
inline

Enable or disable this course as a template.

Parameters
template
Returns
This builder.

Has no effect when creating a course.

◆ WithTermId()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithTermId ( ulong  termId)
inline

The unique term id to create this course in.

Parameters
termId
Returns
This builder.

◆ WithTimeZone()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithTimeZone ( string  timeZone)
inline

The time zone of this course.

Parameters
timeZone
Returns
This builder.

◆ WithUseBlueprintRestrictionsByObjectType()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithUseBlueprintRestrictionsByObjectType ( bool  enabled = true)
inline

Use object-type specific blueprint restrictions.

Parameters
enabled
Returns
This builder.

Has no effect when creating a course.

◆ WithWikiComments()

CourseBuilder UVACanvasAccess.Builders.CourseBuilder.WithWikiComments ( bool  allowed = true)
inline

Allow wiki comments.

Parameters
allowed
Returns
This builder.

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