Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement Staff Add/Update Functions (#2) * Allow for multiple SuccessStatusCode * Implement Add-AeriesStaff * Implement Edit-AeriesStaff * Features/3 (#6) * Create CODE_OF_CONDUCT.md * Update README.md Added "Contributor Covenant" badge * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Fix incorrect parameter validation #21 (#22) * Initial implementation of SendAlert endpoint (#23) * Fix #25 (#26) * Add/Edit/Remove Contacts Implemented (#24) * Implement Add-AeriesContact * Remove printing of the body sent for Add-AeriesContact * Implement Edit-AeriesContact * Fix typo in example text * Implement Remove-AeriesContact * Add support for ShouldProcess to allow -WhatIf * Update CONTRIBUTING.md (#28) Fixed Contributor Code of Conduct link * Features/9 (#32) * Create Add-AeriesActivity * Create Edit-AeriesActivity * Create Remove-AeriesActivity * Features/10 (#33) * Create Add-AeriesAuthorizations * Add Edit-AeriesAuthorization * Add Remove-AeriesAuthorization * features/12 (#34) * Add Edit-AeriesStudentTest * Add 201 as a success status code * Implement Create/Update/Delete for Staff Assignments (#35) * Implement Add-AeriesStaffAssignment * Implement Edit-AeriesStaffAssignment * Implement Remove-AeriesStaffAssignment * Implement Create/Update Gradebook Assignment Information (#36) * Implement Add-AeriesGradebookAssignment * Implement Edit-AeriesGradebookAssignment * Implement Edit-AeriesGradebookAssignmentScore (#37) * Implement Create/Update/Delete Student Course Requests (#39) * Implement Add-AeriesCourseRequest * Implement Edit-AeriesCourseRequest * Implement Remove-AeriesCourseRequest * Implement Create/Update/Delete Alternate Course Requests (#40) * Implement Add-AeriesAlternateCourseRequest * Implement Edit-AeriesAlternateCourseRequest * Implement Remove-AeriesAlternateCourseRequest * Implement Edit-AeriesSchoolSupplemental (#42) * Implement Create/Update/Delete Scheduling Master Schedule (SMS) (#43) * 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 * Add new functions to be exported and visible with help commands (#44) * Add new functions to be exported and visible with help commands * This will be ready to go after #15 #43 Co-authored-by: James Lancaster <20194126+jameslancaster@users.noreply.github.com> Co-authored-by: Aeries Software <61568123+AeriesSoftware@users.noreply.github.com>
- Loading branch information
1 parent
da38f5c
commit 95094dc
Showing
32 changed files
with
4,908 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
function Add-AeriesActivity | ||
{ | ||
<# | ||
.SYNOPSIS | ||
Add an Activity/Award to Aeries | ||
.DESCRIPTION | ||
The Add-AeriesActivity cmdlet is used to create an Activity/Award in Aeries for a given StudentID at the SchoolCode | ||
.EXAMPLE | ||
Add-AeriesActivity -SchoolCode 994 -StudentID 99400001 -TypeCode "1" -DateEntered "2021-10-26" -Comment "This was added via PowerShell!" | ||
This will create an Activity in Aeries for StudentID 99400001 at SchoolCode 994 | ||
#> | ||
|
||
[CmdletBinding()] | ||
param ( | ||
[ValidateRange(1, [Int16]::MaxValue)] | ||
[Parameter(Mandatory=$true)] | ||
[Int16] | ||
$SchoolCode, | ||
|
||
[ValidateRange(1, [Int]::MaxValue)] | ||
[Parameter(Mandatory=$true)] | ||
[int] | ||
$StudentID, | ||
|
||
[Parameter(Mandatory=$false)] | ||
[datetime] | ||
$DateEntered, | ||
|
||
[ValidateLength(1, 1)] | ||
[Parameter(Mandatory=$false)] | ||
[string] | ||
$TypeCode, | ||
|
||
[ValidateLength(1, 3)] | ||
[Parameter(Mandatory=$false)] | ||
[string] | ||
$ActivityOrAwardCode, | ||
|
||
[ValidateLength(1, 40)] | ||
[Parameter(Mandatory=$false)] | ||
[string] | ||
$Name, | ||
|
||
[Parameter(Mandatory=$false)] | ||
[datetime] | ||
$StartDate, | ||
|
||
[Parameter(Mandatory=$false)] | ||
[datetime] | ||
$EndDate, | ||
|
||
[ValidateLength(1, 1)] | ||
[Parameter(Mandatory=$false)] | ||
[decimal] | ||
$Hours = -1, | ||
|
||
[ValidateLength(1, 6)] | ||
[Parameter(Mandatory=$false)] | ||
[string] | ||
$ReasonCode, | ||
|
||
[ValidateLength(1, 3)] | ||
[Parameter(Mandatory=$false)] | ||
[string] | ||
$SeasonCode, | ||
|
||
[ValidateLength(1, 1)] | ||
[Parameter(Mandatory=$false)] | ||
[string] | ||
$StatusCode, | ||
|
||
[Parameter(Mandatory=$false)] | ||
[datetime] | ||
$TransportationDate, | ||
|
||
[ValidateLength(1, 1)] | ||
[Parameter(Mandatory=$false)] | ||
[string] | ||
$TransportationStatusCode, | ||
|
||
[ValidateLength(1, 3)] | ||
[Parameter(Mandatory=$false)] | ||
[string] | ||
$CareerPathwayCode, | ||
|
||
[Parameter(Mandatory=$false)] | ||
[string] | ||
$Comment | ||
) | ||
|
||
Begin { | ||
Write-Verbose -Message "Begin running $($MyInvocation.MyCommand)" | ||
|
||
$Method = "Post" | ||
$SuccessStatusCode = 201 | ||
$Endpoint = "v5/schools/$SchoolCode/students/$StudentID/activities" | ||
$ContentType = "application/json" | ||
$Body = @{} | ||
} | ||
|
||
Process { | ||
If (![string]::IsNullOrWhiteSpace($DateEntered)) { | ||
<# Datetime Value #> | ||
$Body.DateEntered = $DateEntered.ToString("yyyy-MM-dd") | ||
} | ||
|
||
If (![string]::IsNullOrWhiteSpace($TypeCode)) { | ||
<# String Value #> | ||
$Body.TypeCode = $TypeCode | ||
} | ||
|
||
If (![string]::IsNullOrWhiteSpace($ActivityOrAwardCode)) { | ||
<# String Value #> | ||
$Body.ActivityOrAwardCode = $ActivityOrAwardCode | ||
} | ||
|
||
If (![string]::IsNullOrWhiteSpace($Name)) { | ||
<# String Value #> | ||
$Body.Name = $Name | ||
} | ||
|
||
If (![string]::IsNullOrWhiteSpace($StartDate)) { | ||
<# Datetime Value #> | ||
$Body.StartDate = $StartDate.ToString("yyyy-MM-dd") | ||
} | ||
|
||
If (![string]::IsNullOrWhiteSpace($EndDate)) { | ||
<# Datetime Value #> | ||
$Body.EndDate = $EndDate.ToString("yyyy-MM-dd") | ||
} | ||
|
||
If (![string]::IsNullOrWhiteSpace($Hours) -and ($Hours -gt -1)) { | ||
<# Decimal Value #> | ||
$Body.Hours = $Hours | ||
} | ||
|
||
If (![string]::IsNullOrWhiteSpace($ReasonCode)) { | ||
<# String Value #> | ||
$Body.ReasonCode = $ReasonCode | ||
} | ||
|
||
If (![string]::IsNullOrWhiteSpace($SeasonCode)) { | ||
<# String Value #> | ||
$Body.SeasonCode = $SeasonCode | ||
} | ||
|
||
If (![string]::IsNullOrWhiteSpace($StatusCode)) { | ||
<# String Value #> | ||
$Body.StatusCode = $StatusCode | ||
} | ||
|
||
If (![string]::IsNullOrWhiteSpace($TransportationDate)) { | ||
<# Datetime Value #> | ||
$Body.TransportationDate = $TransportationDate.ToString("yyyy-MM-dd") | ||
} | ||
|
||
If (![string]::IsNullOrWhiteSpace($TransportationStatusCode)) { | ||
<# String Value #> | ||
$Body.TransportationStatusCode = $TransportationStatusCode | ||
} | ||
|
||
If (![string]::IsNullOrWhiteSpace($CareerPathwayCode)) { | ||
<# String Value #> | ||
$Body.CareerPathwayCode = $CareerPathwayCode | ||
} | ||
|
||
If (![string]::IsNullOrWhiteSpace($Comment)) { | ||
<# String Value #> | ||
$Body.Comment = $Comment | ||
} | ||
|
||
<# Turn the $Body variable into a JSON string for sending to the server #> | ||
$BodyJSON = ($Body | ConvertTo-Json -Compress) | ||
|
||
$Result = (Invoke-AeriesApiCall -Method $Method -Endpoint $Endpoint -SuccessStatusCode $SuccessStatusCode -Body $BodyJSON -ContentType $ContentType) | ||
} | ||
|
||
End { | ||
Write-Verbose -Message "Finish running $($MyInvocation.MyCommand)" | ||
return $Result | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
function Add-AeriesAlternateCourseRequest | ||
{ | ||
<# | ||
.SYNOPSIS | ||
Add an Alternate Course Request to Aeries | ||
.DESCRIPTION | ||
The Add-AeriesAlternateCourseRequest cmdlet is used to add an Alternate Course Request in Aeries for a given StudentID and SchoolCode | ||
.EXAMPLE | ||
Add-AeriesAlternateCourseRequest -SchoolCode 994 -StudentID 99400001 -CourseNumber "123456" | ||
This will create an Alternate Course Request in Aeries for StudentID 99400001 at SchoolCode 994 with Course Number 123456 | ||
#> | ||
|
||
[CmdletBinding()] | ||
param ( | ||
[ValidateRange(1, [Int16]::MaxValue)] | ||
[Parameter(Mandatory=$true)] | ||
[Int16] | ||
$SchoolCode, | ||
|
||
[ValidateRange(1, [Int]::MaxValue)] | ||
[Parameter(Mandatory=$true)] | ||
[int] | ||
$StudentID, | ||
|
||
[ValidateLength(1, 6)] | ||
[Parameter(Mandatory=$true)] | ||
[string] | ||
$CourseNumber, | ||
|
||
[ValidateRange(1, [Int]::MaxValue)] | ||
[Parameter(Mandatory=$false)] | ||
[Int] | ||
$RelativePrioritySortOrder = -1 | ||
) | ||
|
||
Begin { | ||
Write-Verbose -Message "Begin running $($MyInvocation.MyCommand)" | ||
|
||
$Method = "Post" | ||
$SuccessStatusCode = 201 | ||
$Endpoint = "v5/schools/$SchoolCode/students/$StudentID/alternatecourserequests" | ||
$ContentType = "application/json" | ||
$Body = @{} | ||
} | ||
|
||
Process { | ||
$Body.CourseID = $CourseNumber | ||
|
||
If ($RelativePrioritySortOrder -gt -1) { | ||
<# Int Value #> | ||
$Body.RelativePrioritySortOrder = $RelativePrioritySortOrder | ||
} | ||
|
||
<# Turn the $Body variable into a JSON string for sending to the server #> | ||
$BodyJSON = ($Body | ConvertTo-Json -Compress) | ||
|
||
$Result = (Invoke-AeriesApiCall -Method $Method -Endpoint $Endpoint -SuccessStatusCode $SuccessStatusCode -Body $BodyJSON -ContentType $ContentType) | ||
} | ||
|
||
End { | ||
Write-Verbose -Message "Finish running $($MyInvocation.MyCommand)" | ||
return $Result | ||
} | ||
} |
Oops, something went wrong.