Skip to content

Commit

Permalink
Implement Create/Update/Delete Scheduling Master Schedule (SMS) (#43)
Browse files Browse the repository at this point in the history
* Basic structure for Add-AeriesSchedulingSection

* Basic structure for Edit-AeriesSchedulingSection

* Implement Remove-AeriesSchedulingSection

* Implement DELETE SchedulingSection

* Wrote out parameters for function, next is implementation

* Simplify by doing our own check for UsingSectionStaff

* Create class for SectionStaffMembers

* Add ScriptsToProcess to register the Class as valid

* Finalize Add-AeriesSchedulingSection

* Finalize Edit-AeriesSchedulingSection
  • Loading branch information
bsquidwrd committed Mar 1, 2022
1 parent 31fc249 commit b6bc973
Show file tree
Hide file tree
Showing 5 changed files with 1,705 additions and 1 deletion.
4 changes: 3 additions & 1 deletion AeriesApi/AeriesApi.psd1
Expand Up @@ -57,7 +57,9 @@ PowerShellVersion = '5.1'
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
ScriptsToProcess = @(
'Classes\SectionStaffMember.ps1'
)

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
Expand Down
52 changes: 52 additions & 0 deletions AeriesApi/Classes/SectionStaffMember.ps1
@@ -0,0 +1,52 @@
class SectionStaffMember {
[ValidateRange(1, [int]::MaxValue)]
[int]
$StaffID

[ValidateLength(1, 1)]
[bool]
$IsPrimaryTeacher

[ValidateLength(1, 3)]
[string]
$StaffRoleCode

[ValidateLength(1, 3)]
[string]
$TeacherPositionCode

[ValidateSet("Y","N")]
[string]
$AttendancePermission = "N"

[ValidateSet("Y","N")]
[string]
$GradebookPermissionCode = "N"

[ValidateSet("Y","N")]
[string]
$GradeReportingAccess = "N"

[ValidateSet("Y","N")]
[string]
$StudentAccess = "N"

[ValidateSet("Y","N")]
[string]
$IncludeInStateReporting = "N"

[System.Nullable[datetime]]
$StartDate = $null

[System.Nullable[datetime]]
$EndDate = $null

[ValidateLength(1, 1)]
[string]
$InactiveStatusCode

SectionStaffMember([int]$StaffID) {
<# With a constructor defined, this means it can't be made blank. We want to require at least Staff ID #>
$this.StaffID = $StaffID
}
}

0 comments on commit b6bc973

Please sign in to comment.