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

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

Public Types

enum class  CourseEditAction : byte {
  Unpublish , Publish , Conclude , Delete ,
  Undelete
}
 Actions that can be taken when editing a course. More...
 

Public Member Functions

CourseBuilder WithName (string name)
 The name of this course. More...
 
CourseBuilder WithCourseCode (string courseCode)
 The course code of this course. More...
 
CourseBuilder WithStartDate (DateTime start)
 The start date of this course. More...
 
CourseBuilder WithEndDate (DateTime end)
 The end date of this course. More...
 
CourseBuilder WithLicense (License license)
 The license type for this course. More...
 
CourseBuilder AsPublic (bool @public=true)
 Make the course visible to all unauthenticated or authenticated users. More...
 
CourseBuilder AsPublicToAuthUsers (bool publicToAuth=true)
 Make the course visible to all authenticated users. More...
 
CourseBuilder WithPublicSyllabus (bool publicSyllabus=true)
 Make the syllabus public. More...
 
CourseBuilder WithPublicDescription (string description)
 The course's public description. More...
 
CourseBuilder WithStudentWikiEditing (bool allowed=true)
 Allow students to edit the wiki. More...
 
CourseBuilder WithWikiComments (bool allowed=true)
 Allow wiki comments. More...
 
CourseBuilder WithStudentForumAttachments (bool allowed=true)
 Allow students to attach files to forum posts. More...
 
CourseBuilder WithOpenEnrollment (bool openEnrollment=true)
 Allow open enrollment. More...
 
CourseBuilder WithSelfEnrollment (bool selfEnrollment=true)
 Allow self enrollment. More...
 
CourseBuilder WithDateRestrictedEnrollments (bool restrict=true)
 Only allow enrollments between this course's start and end dates. More...
 
CourseBuilder WithTermId (ulong termId)
 The unique term id to create this course in. More...
 
CourseBuilder WithSisId (string sis)
 The course's SIS id. More...
 
CourseBuilder WithIntegrationId (string integration)
 The course's integration id. More...
 
CourseBuilder WithHiddenFinalGrades (bool hide=true)
 Hide final grades in the student summary. More...
 
CourseBuilder WithAssignmentGroupWeight (bool weight=true)
 Apply assigment group weighting to final grades. More...
 
CourseBuilder WithTimeZone (string timeZone)
 The time zone of this course. More...
 
CourseBuilder OfferImmediately (bool offerNow=true)
 Make this course available to students immediately. More...
 
CourseBuilder EnrollCurrentUser (bool enrollMe=true)
 Enroll the current user immediately as a teacher in this course. More...
 
CourseBuilder WithDefaultView (CourseView defaultView)
 The course's default view. More...
 
CourseBuilder WithSyllabusBody (string body)
 The course syllabus. More...
 
CourseBuilder WithGradingStandard (ulong standard)
 The grading standard for this course. More...
 
CourseBuilder WithCourseFormat (CourseFormat format)
 The course format. More...
 
CourseBuilder TryToRecoverFromSis (bool tryToRecover=true)
 Try to recover a deleted course from SIS with a matching SIS id before creating this course. More...
 
CourseBuilder TakeAction (CourseEditAction action)
 Perform the action indicated by action when editing a course; publish, unpublish, conclude, delete, or undelete the course. More...
 
Task< CoursePost ()
 Creates the assignment using the fields in this builder. More...
 

Detailed Description

Used to create 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.

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

Creates the assignment using the fields in this builder.

Returns
The newly created assignment.

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

◆ WithAssignmentGroupWeight()

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

Apply assigment group weighting to final grades.

Parameters
weight
Returns
This builder.

◆ WithCourseCode()

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

The course code of this course.

Parameters
courseCode
Returns
This builder.

◆ WithCourseFormat()

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

The course format.

Parameters
format
Returns
This builder.

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

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

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

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

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

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

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

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

◆ 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: