# Functions

Specific logic used by PEMS for automation

# 1. Calendar Functions

<table border="1" id="bkmrk-calendar-not-started" style="border-collapse: collapse; width: 99.7531%; height: 450.516px;"><colgroup><col style="width: 17.72%;"></col><col style="width: 12.2677%;"></col><col style="width: 70.1363%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Calendar Functions](https://bsa.lynops.com/books/personal-education-management-system/page/1-calendar-functions-complete-ready "Calendar Functions")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 1.0 Calculate field Values for Calendar Tables

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*After the user enters vacation days, and configures start dated, PEMS calculates the number of days in a term.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Trigger*</td><td style="height: 46.5938px;">*Recalculate anytime there is a change to any records used to make these calculations upon save*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*Initial configuration was completed.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*These functions may be run anytime there is a new school term record.*

<p class="callout warning">*need some way to limit how many times this is recalculated.*</p>

</td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;"> </td><td style="height: 80.1719px;">Step 1</td><td style="height: 80.1719px;">For each new [School Term](https://cs.studianova.org/admin/terms) record, calculate the number of calendar days between the start and end dates, excluding the days specified in the associated [Term Label](https://cs.studianova.org/admin/termlabels) record. Enter result in [School Term](https://cs.studianova.org/admin/terms) calendar days.

</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 2</td><td style="height: 35.3906px;">For each [School Term](https://cs.studianova.org/admin/terms), count the number of associated [Vacation Days](https://cs.studianova.org/admin/vacationdays) records with status = activated.</td></tr><tr style="height: 35.375px;"><td style="height: 35.375px;">  
</td><td style="height: 35.375px;">Step 3</td><td style="height: 35.375px;">Calculate [School Term](https://cs.studianova.org/admin/terms) school days by subtracting the number of vacation days found above from the school days, enter as [School Term](https://cs.studianova.org/admin/terms) calendar days</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 4</td><td style="height: 29.7969px;">[Academic Year](https://cs.studianova.org/admin/academicyears) school days is the sum of the associated [School Term](https://cs.studianova.org/admin/terms) school days.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 5</td><td style="height: 29.7969px;">[Academic Year](https://cs.studianova.org/admin/academicyears) calendar days is the sum of the associated [School Term](https://cs.studianova.org/admin/terms) calendar days.</td></tr><tr><td>END</td><td>  
</td><td>  
</td></tr></tbody></table>

<table border="1" id="bkmrk-calendar-functions-n" style="border-collapse: collapse; width: 99.7531%; height: 513.281px;"><colgroup><col style="width: 17.72%;"></col><col style="width: 12.2677%;"></col><col style="width: 70.1363%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Calendar Functions](https://bsa.lynops.com/books/personal-education-management-system/page/1-calendar-functions-complete-ready "Calendar Functions")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 1.1 Automatically Create Academic Years Past and Future

</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">  
</td><td style="height: 63.3906px;">*Purpose*</td><td style="height: 63.3906px;">*Automate creating new academic future academic records when the user-defined promotion date has been reached. This reduces the need for users to add a year every time they complete one.*</td></tr><tr style="height: 38.7969px;"><td style="height: 38.7969px;">  
</td><td style="height: 38.7969px;">*Trigger*</td><td style="height: 38.7969px;">*Promotion Date (school configuration) = actual date*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*Initial configuration was completed.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*This function must run before more school terms can be created.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;"> </td><td style="height: 46.5938px;">Step 1</td><td style="height: 46.5938px;">Find the academic year record the farthest in the future, the <span style="text-decoration: underline;">**"last record"**</span></td></tr><tr style="height: 38.375px;"><td style="height: 38.375px;">  
</td><td style="height: 38.375px;">Step 2</td><td style="height: 38.375px;">Create one more academic year record</td></tr><tr style="height: 169.734px;"><td style="height: 169.734px;">  
</td><td style="height: 169.734px;">Step 3</td><td style="height: 169.734px;">Set field values:

Sequence = last record sequence + 1

Start year = last record start year + 1

End year = last record end year + 1

Academic year name - concatenate start year - end year

start date = last record start date + 1 year

end date = last record end date + 1 year.

set status = future

</td></tr><tr style="height: 26.375px;"><td style="height: 26.375px;">END</td><td style="height: 26.375px;"> </td><td style="height: 26.375px;"> </td></tr></tbody></table>


<table border="1" id="bkmrk-calendar-functions-n-1" style="border-collapse: collapse; width: 100%; height: 288.781px;"><colgroup><col style="width: 17.5525%;"></col><col style="width: 11.9901%;"></col><col style="width: 70.4574%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Calendar Functions](https://bsa.lynops.com/books/personal-education-management-system/page/1-calendar-functions-complete-ready "Calendar Functions")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 1.2 Automatically Update Status of Academic Years.

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*Academic Year records have a status of current, past, or future, update the status of the records automatically when the user-defined promotion date has been reached.*</td></tr><tr style="height: 38.7969px;"><td style="height: 38.7969px;">  
</td><td style="height: 38.7969px;">*Trigger*</td><td style="height: 38.7969px;">*Managed by the Promotion WorkFlow*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*There can be only one current year.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Sequence*</td><td style="height: 46.5938px;">*This step is best triggered after the next future record has been made and in accordance with the PROMOTION workflow.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 1</td><td style="height: 29.7969px;">Set previous current academic year status to 'past'</td></tr><tr style="height: 10px;"><td style="height: 10px;">  
</td><td style="height: 10px;">Step 2</td><td style="height: 10px;">Set next year, based on ordinate to current.</td></tr><tr><td>END</td><td>  
</td><td>  
</td></tr></tbody></table>

<table border="1" id="bkmrk-calendar-functions-n-2" style="border-collapse: collapse; width: 100%; height: 970.939px;"><colgroup><col style="width: 17.5525%;"></col><col style="width: 11.9901%;"></col><col style="width: 70.4574%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Calendar Functions](https://bsa.lynops.com/books/personal-education-management-system/page/1-calendar-functions-complete-ready "Calendar Functions")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 1.3 Automatically Create School Term Records

</td></tr><tr style="height: 39.375px;"><td style="height: 39.375px;">  
</td><td style="height: 39.375px;">*Purpose*</td><td style="height: 39.375px;">*Automate student term records creation as new academic years are added.*</td></tr><tr style="height: 38.7969px;"><td style="height: 38.7969px;">  
</td><td style="height: 38.7969px;">*Trigger*</td><td style="height: 38.7969px;">*When a new academic year is added.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Sequence*</td><td style="height: 46.5938px;">*This step is best triggered after the creation of a new academic year record. Term records must be made before students can have their plans updated.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 1</td><td style="height: 29.7969px;">Find the first term label record with Flag = official start term.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 2</td><td style="height: 29.7969px;">Create a new school term record</td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;">  
</td><td style="height: 80.1719px;">Step 3</td><td style="height: 80.1719px;">Set Term Start Year and Start Date

Academic year: start date =&gt; term: start date

Academic year start year =&gt; term: start year

</td></tr><tr style="height: 214.516px;"><td style="height: 214.516px;">*calculate estimated dates, terms may run over an calendar year*</td><td style="height: 214.516px;">Step 4</td><td style="height: 214.516px;">Calculate Term End Year, Term End Date

If Term Label "End in same year" = true then:

Term End Year = term: <span style="text-decoration: underline;">start yea</span>r

Term End Date = Term: <span style="text-decoration: underline;">start yea</span>r; Term label:end month: Term Label End day

If Term label "End in same year" = False then:

Term End Year = term: <span style="text-decoration: underline;">start yea</span>r + 1

Term End Date = Term: <span style="text-decoration: underline;">end year</span>; Term label:end month: Term Label End day

</td></tr><tr style="height: 145.719px;"><td style="height: 145.719px;">  
</td><td style="height: 145.719px;">Step 4</td><td style="height: 145.719px;">Set other term field values:

Name - concatenate term label name and term: start year

status = future

term label =&gt; related term label record

academic year =&gt; related academic year record

term label flag =&gt; term flag

</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">Step 5</td><td style="height: 46.5938px;">If term label: flag not equal to "official end term" then go to the next term label record, increase term label: sequence by one.</td></tr><tr><td>  
</td><td>Ste 6 </td><td>Set Term Start Year and Start Date

If <span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **&lt;/= (LESS THAN OR EQUAL TO)** term label start month, term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year

Else term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year + 1

</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 6</td><td style="height: 29.7969px;">Continue to the next Term Label record (sequence + 1), stop when sequence + 1 can not be found (note we must continue past 'official end term' into optional terms.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 7</td><td style="height: 29.7969px;">Set other term fields per step 4</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">END</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">**[Review 1.3 Use Case Test](https://bsa.lynops.com/books/personal-education-management-system/page/1-calendar-functions-complete "Review Use Case Test")**</td></tr></tbody></table>


#### Use Case Test 1.3 Automatically Create School Term Records


<table border="1" id="bkmrk-classic-semesters-i-" style="border-collapse: collapse; width: 100%; height: 1483.48px;"><colgroup><col style="width: 13.1026%;"></col><col style="width: 10.2596%;"></col><col style="width: 10.2596%;"></col><col style="width: 10.754%;"></col><col style="width: 8.77627%;"></col><col style="width: 19.1595%;"></col><col style="width: 6.42769%;"></col><col style="width: 15.3276%;"></col><col style="width: 5.93325%;"></col></colgroup><tbody><tr style="height: 66.8281px;"><td style="height: 66.8281px;">##### **Classic Semesters I**

</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td></tr><tr style="height: 96.9844px;"><td style="height: 96.9844px;">  
</td><td style="height: 96.9844px;">**Term Label Start Month**</td><td style="height: 96.9844px;">**Term Label End Month**</td><td style="height: 96.9844px;">**Term Label Flag**</td><td style="height: 96.9844px;">**Term Label End in Same Year**</td><td style="height: 96.9844px;">**School Term start year**</td><td style="height: 96.9844px;">  
</td><td style="height: 96.9844px;">**School Term end year**</td><td style="height: 96.9844px;">  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">**Academic Year**</td><td style="height: 46.5938px;">9-2023</td><td style="height: 46.5938px;">5-2024</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td></tr><tr style="height: 96.9844px;"><td style="height: 96.9844px;"><span style="color: rgb(224, 62, 45);">**Fall**</span></td><td style="height: 96.9844px;"><span style="color: rgb(224, 62, 45);">9</span></td><td style="height: 96.9844px;"><span style="color: rgb(224, 62, 45);">1</span></td><td style="height: 96.9844px;"><span style="color: rgb(224, 62, 45);">Official Start Term</span></td><td style="height: 96.9844px;"><span style="color: rgb(224, 62, 45);">false</span></td><td style="height: 96.9844px;">flag = official start term start year so start year = academic start year = 2023</td><td style="height: 96.9844px;">pass</td><td style="height: 96.9844px;">"end in same year" = false so term end year = term start year + 1 = 2024</td><td style="height: 96.9844px;">pass</td></tr><tr style="height: 147.375px;"><td style="height: 147.375px;">**Spring**</td><td style="height: 147.375px;">1</td><td style="height: 147.375px;">5</td><td style="height: 147.375px;">Official End Term</td><td style="height: 147.375px;">true</td><td style="height: 147.375px;"><span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **&lt;/=** term label start month, so term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year = 2024</td><td style="height: 147.375px;">pass</td><td style="height: 147.375px;">"end in same year = true so term end year = term start year = 2024</td><td style="height: 147.375px;">pass</td></tr><tr style="height: 147.375px;"><td style="height: 147.375px;">**Summer**</td><td style="height: 147.375px;">6</td><td style="height: 147.375px;">8</td><td style="height: 147.375px;">  
</td><td style="height: 147.375px;">true</td><td style="height: 147.375px;"><span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **&lt;/=** term label start month, so term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year = 2024</td><td style="height: 147.375px;">pass</td><td style="height: 147.375px;">"end in same year = true so term end year = term start year = 2024</td><td style="height: 147.375px;">pass</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td></tr><tr style="height: 66.8281px;"><td style="height: 66.8281px;">##### **Classic Semesters II**

</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">**Academic Year**</td><td style="height: 46.5938px;">8-2023</td><td style="height: 46.5938px;">5-2024</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td></tr><tr style="height: 96.9844px;"><td style="height: 96.9844px;">**Fall**</td><td style="height: 96.9844px;">8</td><td style="height: 96.9844px;">12</td><td style="height: 96.9844px;">Official Start Term</td><td style="height: 96.9844px;">true</td><td style="height: 96.9844px;">flag = official start term start year so start year = academic start year = 2023</td><td style="height: 96.9844px;">pass</td><td style="height: 96.9844px;">"end in same year" = true so term end year = term start year = 2023</td><td style="height: 96.9844px;">pass</td></tr><tr style="height: 147.375px;"><td style="height: 147.375px;"><span style="color: rgb(224, 62, 45);">**Spring**</span></td><td style="height: 147.375px;"><span style="color: rgb(224, 62, 45);">12</span></td><td style="height: 147.375px;"><span style="color: rgb(224, 62, 45);">5</span></td><td style="height: 147.375px;"><span style="color: rgb(224, 62, 45);">Official End Term</span></td><td style="height: 147.375px;"><span style="color: rgb(224, 62, 45);">false</span></td><td style="height: 147.375px;"><span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **&lt;/=** term label start month, so term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year = 2023</td><td style="height: 147.375px;">pass</td><td style="height: 147.375px;">"end in same year" = false so term end year = start year + 1 = 2024</td><td style="height: 147.375px;">pass</td></tr><tr style="height: 147.375px;"><td style="height: 147.375px;">**Summer**</td><td style="height: 147.375px;">6</td><td style="height: 147.375px;">7</td><td style="height: 147.375px;">  
</td><td style="height: 147.375px;">true</td><td style="height: 147.375px;"><span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **&lt;/=** term label start month, so term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year = 2024</td><td style="height: 147.375px;">  
</td><td style="height: 147.375px;">"end in same year" = true so term end year = start year = 2023</td><td style="height: 147.375px;">pass</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td></tr><tr style="height: 66.8281px;"><td style="height: 66.8281px;">##### Classic Semesters III

</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">**Academic Year**</td><td style="height: 46.5938px;">8-2023</td><td style="height: 46.5938px;">5-2024</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td></tr><tr style="height: 96.9844px;"><td style="height: 96.9844px;">**Fall**</td><td style="height: 96.9844px;">8</td><td style="height: 96.9844px;">12</td><td style="height: 96.9844px;">Official Start Term</td><td style="height: 96.9844px;">true</td><td style="height: 96.9844px;">flag = official start term start year so start year = academic start year = 2023</td><td style="height: 96.9844px;">pass</td><td style="height: 96.9844px;">"end in same year" = true so term end year = term start year = 2023</td><td style="height: 96.9844px;">pass</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Spring**</td><td style="height: 29.7969px;">1</td><td style="height: 29.7969px;">5</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">true</td><td style="height: 29.7969px;"><span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **NOT** **&lt;/=** term label start month, so term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year + 1 = 2024</td><td style="height: 29.7969px;">pass</td><td style="height: 29.7969px;">"end in same year" = true so term end year = term start year = 2024</td><td style="height: 29.7969px;">pass</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">**Summer**</td><td style="height: 46.5938px;">6</td><td style="height: 46.5938px;">8</td><td style="height: 46.5938px;">Official End Term</td><td style="height: 46.5938px;">true</td><td style="height: 46.5938px;"><span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **&lt;/=** term label start month, so term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year = 2024</td><td style="height: 46.5938px;">pass</td><td style="height: 46.5938px;">"end in same year" = true so term end year = term start year = 2024</td><td style="height: 46.5938px;">pass</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td></tr></tbody></table>

<table border="1" id="bkmrk-calendar-functions-n-3" style="border-collapse: collapse; width: 100%; height: 288.781px;"><colgroup><col style="width: 17.5525%;"></col><col style="width: 11.9901%;"></col><col style="width: 70.4574%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Calendar Functions](https://bsa.lynops.com/books/personal-education-management-system/page/1-calendar-functions-complete-ready "Calendar Functions")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 1.4 Automatically Calculate Vacation Days In Terms and Academic Years

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*Academic Year records have a status of current, past, or future, update the status of the records automatically when the user-defined promotion date has been reached.*</td></tr><tr style="height: 38.7969px;"><td style="height: 38.7969px;">  
</td><td style="height: 38.7969px;">*Trigger*</td><td style="height: 38.7969px;">*Managed by the Promotion WorkFlow*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*There can be only one current year.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Sequence*</td><td style="height: 46.5938px;">*This step is best triggered after the next future record has been made and in accordance with the PROMOTION workflow.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 1</td><td style="height: 29.7969px;">Set previous current academic year status to 'past'</td></tr><tr style="height: 10px;"><td style="height: 10px;">  
</td><td style="height: 10px;">Step 2</td><td style="height: 10px;">Set next year, based on ordinate to current.</td></tr><tr><td>END</td><td>  
</td><td> </td></tr></tbody></table>

# 2. Student Record Intake Functions

<table border="1" id="bkmrk-calendar-functions-n" style="border-collapse: collapse; width: 99.7531%; height: 470.203px;"><colgroup><col style="width: 17.72%;"></col><col style="width: 12.2677%;"></col><col style="width: 70.0124%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Student Fields](https://bsa.lynops.com/books/personal-education-management-system/page/2-student-intake-functions "Student Fields")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 2.0 Set Intake Value Defaults - <span style="background-color: rgb(251, 238, 184);">COMPLETED</span>

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*Based on the student start grade level, enter the student's current grade level.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Trigger*</td><td style="height: 29.7969px;">*Runs only one time, when the student record is first entered, never updated.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*requisite fields are not empty.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*This function runs after the student record is created.*</td></tr><tr style="height: 57.75px;"><td style="height: 57.75px;"> </td><td style="height: 57.75px;">Step 1</td><td style="height: 57.75px;">Set [Student](https://cs.studianova.org/admin/students) current grade level equal to [Student](https://cs.studianova.org/admin/students) start grade.

</td></tr><tr style="height: 57.75px;"><td style="height: 57.75px;">  
</td><td style="height: 57.75px;">Step 2</td><td style="height: 57.75px;">Set [Student](https://cs.studianova.org/admin/students) promotion equal to "promote".

</td></tr><tr style="height: 57.75px;"><td style="height: 57.75px;">  
</td><td style="height: 57.75px;">Step 3</td><td style="height: 57.75px;">Set [Student](https://cs.studianova.org/admin/students) status equal to "planned".

</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;"><s>Step 4</s></td><td style="height: 35.3906px;"><s>Set [Student](https://cs.studianova.org/admin/students) cohort = linked homeroom record</s>

Creating student logins will be done in a separate step after student record created.

</td></tr><tr style="height: 38.375px;"><td style="height: 38.375px;">END</td><td style="height: 38.375px;">  
</td><td style="height: 38.375px;"> </td></tr></tbody></table>

<table border="1" id="bkmrk-student-fields-not-s" style="border-collapse: collapse; width: 99.7531%; height: 474.094px;"><colgroup><col style="width: 17.72%;"></col><col style="width: 12.2677%;"></col><col style="width: 70.0124%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Student Fields](https://bsa.lynops.com/books/personal-education-management-system/page/2-student-intake-functions "Student Fields")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 2.1 Enter Student's Grade Span and School

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*Reduce data entry by automatically finding the student grade span based on current grade level.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Trigger*</td><td style="height: 46.5938px;">*When new student record is entered <s>or when the student's current grade level changes.</s>*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*requisite fields are not empty.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*This function runs after the student record is created.*</td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;"> </td><td style="height: 80.1719px;">Step 1</td><td style="height: 80.1719px;">Find the [Grade Span](https://cs.studianova.org/admin/gradespans) with start grade greater than or equal to the [Student](https://cs.studianova.org/admin/students) <s>current</s> <span style="text-decoration: underline;">start</span> grade level AND [Grade Span](https://cs.studianova.org/admin/gradespans) with end grade after of equal to the [Student](https://cs.studianova.org/admin/students) current: *grade span start grade **≤** student start grade **≤** grade span end grade*

</td></tr><tr style="height: 57.7812px;"><td style="height: 57.7812px;">  
</td><td style="height: 57.7812px;">Step 2</td><td style="height: 57.7812px;">Associate the [Grade Span](https://cs.studianova.org/admin/gradespans) record found above to the [Student](https://cs.studianova.org/admin/students) record with the [Student](https://cs.studianova.org/admin/students) grade span field.

</td></tr><tr style="height: 57.7812px;"><td style="height: 57.7812px;">  
</td><td style="height: 57.7812px;">Step 3</td><td style="height: 57.7812px;">Find the [School](https://cs.studianova.org/admin/schools) record associated to the [Grade Span](https://cs.studianova.org/admin/gradespans) record found above and associate to the [Student](https://cs.studianova.org/admin/students) record with the [Student](https://cs.studianova.org/admin/students) school field.

</td></tr><tr style="height: 38.375px;"><td style="height: 38.375px;">END</td><td style="height: 38.375px;">  
</td><td style="height: 38.375px;"> </td></tr></tbody></table>

<table border="1" id="bkmrk-student-fields-not-s-1" style="border-collapse: collapse; width: 99.7531%; height: 672.453px;"><colgroup><col style="width: 17.72%;"></col><col style="width: 12.2677%;"></col><col style="width: 70.1363%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Student Fields](https://bsa.lynops.com/books/personal-education-management-system/page/2-student-intake-functions "Student Fields")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 2.2 Calculate Graduation Date and Remaining Years

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*By finding the last day of school and how many years left in the school, PEMS helps admins estimate future enrollment.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Trigger*</td><td style="height: 46.5938px;">*When a new student record is entered <s>and every time a student completes a year. If a student 'skips' a grade level then their future date will change.</s>*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*requisite fields are not empty.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*This function runs when the student record is created.*</td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;"> </td><td style="height: 80.1719px;">Step 1</td><td style="height: 80.1719px;">[Student](https://cs.studianova.org/admin/students) remaining years = [School Configuration](https://cs.studianova.org/admin/crmfields) highest\_grade\_level - [Student](https://cs.studianova.org/admin/students) <s>current</s> <span style="text-decoration: underline;">start </span>grade level.

*note: remaining years does not include the student's enrollment year/current year*

</td></tr><tr style="height: 52.1875px;"><td style="height: 52.1875px;">  
</td><td style="height: 52.1875px;">Step 2</td><td style="height: 52.1875px;">Find the<s> current (status = current) </s>[Academic Year](https://cs.studianova.org/admin/academicyears) sequence of <span style="text-decoration: underline;">start year based on start and end dates.</span></td></tr><tr style="height: 52.1875px;"><td style="height: 52.1875px;">  
</td><td style="height: 52.1875px;">Step 3</td><td style="height: 52.1875px;">Add [Student](https://cs.studianova.org/admin/students) remaining years to <span style="text-decoration: underline;">start year</span> <s>current (status = current)</s> [Academic Year](https://cs.studianova.org/admin/academicyears) sequence.</td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;">  
</td><td style="height: 80.1719px;">Step 4</td><td style="height: 80.1719px;">Find the Academic year with the sequence value found above, this is the graduating academic year. There is no field for the graduating academic year.

<span style="text-decoration: underline;">Find the grad year end date.</span>

</td></tr><tr style="height: 57.7812px;"><td style="height: 57.7812px;">  
</td><td style="height: 57.7812px;"><s>Step 5</s></td><td style="height: 57.7812px;"><s>Find the last [School term](https://cs.studianova.org/admin/terms) associated with the Academic year found above. The last School term has an associated [Term Label](https://cs.studianova.org/admin/termlabels) record with flag = official end term.</s></td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;">  
</td><td style="height: 80.1719px;"><s>Step 6</s></td><td style="height: 80.1719px;"><s>The end date of the last [School term](https://cs.studianova.org/admin/terms) of the graduating academic year is the [Student](https://cs.studianova.org/admin/students) graduation date.</s>

<span style="text-decoration: underline;">Use grad year end date, calendar functions will update the year end date based on the school term associated end date when there is a change.</span>

</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">END</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td></tr></tbody></table>


<table border="1" id="bkmrk-student-fields-not-s-2" style="border-collapse: collapse; width: 99.7531%; height: 371.531px;"><colgroup><col style="width: 17.72%;"></col><col style="width: 12.2677%;"></col><col style="width: 70.1363%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Student Fields](https://bsa.lynops.com/books/personal-education-management-system/page/2-student-intake-functions "Student Fields")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 2.3 Find and Enter Student's School Start Term - <span style="background-color: rgb(251, 238, 184);">COMPLETED</span>

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*Based on the student start date, auto-enter the student start term, the purpose is to reduce data entry for the user.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Trigger*</td><td style="height: 46.5938px;">*When new student record is entered or when the student start date changes. This function only runs if the student status = planned.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*requisite fields are not empty.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*This function runs after the student record is created and only once on student intake.*</td></tr><tr style="height: 57.7812px;"><td style="height: 57.7812px;"> </td><td style="height: 57.7812px;">Step 1</td><td style="height: 57.7812px;">Find the [School Term](https://cs.studianova.org/admin/terms) with start date before or equal to the [Student](https://cs.studianova.org/admin/students) start date AND [School Term](https://cs.studianova.org/admin/terms) with end date after or equal to the [Student](https://cs.studianova.org/admin/students) start date:

*school term start date **≤** student start date **≤** school term end date*

</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 2</td><td style="height: 35.3906px;">Associate the [School Term](https://cs.studianova.org/admin/terms) record to the [Student](https://cs.studianova.org/admin/students) record with the School Start term field.

</td></tr><tr style="height: 38.375px;"><td style="height: 38.375px;">END</td><td style="height: 38.375px;">  
</td><td style="height: 38.375px;">  
</td></tr></tbody></table>


<table border="1" id="bkmrk-student-fields-not-s-3" style="border-collapse: collapse; width: 99.7531%; height: 807.155px;"><colgroup><col style="width: 17.72%;"></col><col style="width: 12.2677%;"></col><col style="width: 70.1363%;"></col></colgroup><tbody><tr style="height: 67.4219px;"><td style="height: 67.4219px;">[Student Fields](https://bsa.lynops.com/books/personal-education-management-system/page/2-student-intake-functions "Student Fields")</td><td style="height: 67.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 67.4219px;">#### 2.4 Calculate Enrollment Year Terms

</td></tr><tr style="height: 80.1875px;"><td style="height: 80.1875px;">  
</td><td style="height: 80.1875px;">*Purpose*</td><td style="height: 80.1875px;">*Students transfer in and out of schools at various times and frequently in the middle of school terms. Many student's do not complete all the terms in their first year enrolled in the term. Based on the student's start date, calculate how many terms the student attends in their first year attending the school.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Trigger*</td><td style="height: 46.5938px;">*When new student record is entered or when the student start date changes. This function only runs if the student status = planned.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*requisite fields are not empty.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*After function 2.23 runs and only once on student intake.*</td></tr><tr style="height: 57.7812px;"><td style="height: 57.7812px;"> </td><td style="height: 57.7812px;">Step 1</td><td style="height: 57.7812px;">Find <span style="text-decoration: underline;">ordinate </span>of the the [School Term](https://cs.studianova.org/admin/terms) linked to the [Student](https://cs.studianova.org/admin/students) from the school start term field, found in function 2.3 above.

</td></tr><tr style="height: 102.562px;"><td style="height: 102.562px;">  
</td><td style="height: 102.562px;">Step 2</td><td style="height: 102.562px;"><s>If the [Term Label](https://cs.studianova.org/admin/termlabels) record linked to the [School Term](https://cs.studianova.org/admin/terms) has [Term Label](https://cs.studianova.org/admin/termlabels) flag = official end term, then [Student](https://cs.studianova.org/admin/students) Enrollment year terms = 1. (Then quit logic)</s>

<s>Else:</s>

**<span style="text-decoration: underline;">Find the start year's child [School Term](https://cs.studianova.org/admin/terms) record.</span>**

</td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;">  
</td><td style="height: 80.1719px;">Step 3</td><td style="height: 80.1719px;"><s>Find the ordinate of the [School Term](https://cs.studianova.org/admin/terms) linked to the [Student](https://cs.studianova.org/admin/students). *("ordinate start")*</s>

<span style="text-decoration: underline;">**Based on the related [Term Label](https://cs.studianova.org/admin/termlabels) flag, flag = official end, find the ordinate of the last school term in the academic start year.**</span>

</td></tr><tr style="height: 102.562px;"><td style="height: 102.562px;">  
</td><td style="height: 102.562px;">Step 4</td><td style="height: 102.562px;"><s>Find the ordinate of the [School Term](https://cs.studianova.org/admin/terms) record in the same [Academic Year ](https://cs.studianova.org/admin/academicyears)= same as [Student](https://cs.studianova.org/admin/students) school start term and has a linked [Term Label](https://cs.studianova.org/admin/termlabels) record with flag = official end term. *("ordinate end")*</s>

**<span style="text-decoration: underline;">Enrollment year terms = end year ordinate - ordinate of school start term + 1</span>**

</td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;">  
</td><td style="height: 80.1719px;"><s>Step 5</s></td><td style="height: 80.1719px;"><s>Find remaining terms. Subtract the sequence the student schools start term from the school term record found above, the official end term, then add 1:</s>

<s>*remaining terms = ("ordinate end") - ("ordinate start") + 1*</s>

</td></tr><tr style="height: 38.375px;"><td style="height: 38.375px;">END</td><td style="height: 38.375px;">  
</td><td style="height: 38.375px;"> </td></tr><tr style="height: 91.734px;"><td style="height: 91.734px;"><span style="color: rgb(52, 73, 94); background-color: rgb(251, 238, 184);">*Introduces a Restriction*</span></td><td style="height: 91.734px;">  
</td><td style="height: 91.734px;"><span style="color: rgb(52, 73, 94);">*This method assumes that there are no interim terms that are optional, that the optional terms are either at the beginning or end of an official academic year.* </span>

<span style="color: rgb(52, 73, 94);">*There is one use case where this assumption will fail, the 'intersession' where students can optionally enroll in a short period between terms, usually over the Christmas holiday to make up work that was not completed.*</span>

<span style="color: rgb(52, 73, 94);">*We will not design for intersession, and only allow optional terms to be before or after the standard academic year. This use case is not very common.*</span>

</td></tr></tbody></table>

#### <s>Use Case Test 2.4 Calculate Enrollment Year Terms\*</s>

<table border="1" id="bkmrk-school-term-ordinate" style="border-collapse: collapse; width: 100%; height: 900.391px;"><colgroup><col style="width: 12.4845%;"></col><col style="width: 14.5859%;"></col><col style="width: 11.6193%;"></col><col style="width: 12.979%;"></col><col style="width: 14.3387%;"></col><col style="width: 14.4623%;"></col><col style="width: 19.6539%;"></col></colgroup><tbody><tr style="height: 63.3906px;"><td style="height: 63.3906px;">  
</td><td style="height: 63.3906px;"><s>**School term**</s></td><td style="height: 63.3906px;"><s>**Ordinate school term**</s></td><td style="height: 63.3906px;"><s>**Term Label**</s></td><td style="height: 63.3906px;"><s>**Flag**</s></td><td style="height: 63.3906px;"><s>**Academic Year**</s></td><td style="height: 63.3906px;"><s>**Logic**</s></td></tr><tr style="height: 124.969px;"><td style="height: 124.969px;"><s>*Student enrolled in fall*</s></td><td style="height: 124.969px;"><s>Fall 2023</s></td><td style="height: 124.969px;"><s>23</s></td><td style="height: 124.969px;"><s>Fall</s></td><td style="height: 124.969px;"><s>Official Start</s></td><td style="height: 124.969px;"><s>2023-2024</s></td><td style="height: 124.969px;"><s> 'ordinate start' = 23, flag is not official end term so find the correct record.</s></td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">  
</td><td style="height: 63.3906px;"><s>Spring 2024</s></td><td style="height: 63.3906px;"><s>24</s></td><td style="height: 63.3906px;"><s>Spring</s></td><td style="height: 63.3906px;"><s>Official End Term</s></td><td style="height: 63.3906px;"><s>2023-2024</s></td><td style="height: 63.3906px;"><s>end term for same academic year, so 'ordinate end' = 24</s></td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;"><s>*Enrollment year terms:*</s></td><td style="height: 46.5938px;"><s>**24 - 23 + 1 = 2** </s></td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;"></td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;"><s>Fall 2023</s></td><td style="height: 35.3906px;"><s>23</s></td><td style="height: 35.3906px;"><s>Fall</s></td><td style="height: 35.3906px;"><s>Official Start</s></td><td style="height: 35.3906px;"><s>2023-2024</s></td><td style="height: 35.3906px;"></td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;"><s>*Student enrolled in spring*</s></td><td style="height: 80.1719px;"><s>Spring 2024</s></td><td style="height: 80.1719px;"><s>24</s></td><td style="height: 80.1719px;"><s>Spring</s></td><td style="height: 80.1719px;"><s>Official End Term</s></td><td style="height: 80.1719px;"><s>2023-2024</s></td><td style="height: 80.1719px;"><s>"ordinate start" = 24</s>

<s>flag = official end term</s>

</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;"><s>*Enrollment year terms:*</s></td><td style="height: 46.5938px;"><s>**1**</s></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;"><s>Student enrolled in summer</s></td><td style="height: 63.3906px;"><s>Summer 2024</s></td><td style="height: 63.3906px;"><s>25</s></td><td style="height: 63.3906px;"><s>Summer</s></td><td style="height: 63.3906px;"><s>Interim</s></td><td style="height: 63.3906px;"><s>2024-2025</s></td><td style="height: 63.3906px;"><s>"ordinate start" = 25</s></td></tr><tr style="height: 124.938px;"><td style="height: 124.938px;">  
</td><td style="height: 124.938px;"><s>Fall 2023</s></td><td style="height: 124.938px;"><s>26</s></td><td style="height: 124.938px;"><s>Fall</s></td><td style="height: 124.938px;"><s>Official Start</s></td><td style="height: 124.938px;"><s>2024-2025</s></td><td style="height: 124.938px;"><s>flag is not official end year, record not found</s></td></tr><tr style="height: 80.1875px;"><td style="height: 80.1875px;">  
</td><td style="height: 80.1875px;"><s>Spring 2024</s></td><td style="height: 80.1875px;"><s>27</s></td><td style="height: 80.1875px;"><s>Spring</s></td><td style="height: 80.1875px;"><s>Official End Term</s></td><td style="height: 80.1875px;"><s>2024-2025</s></td><td style="height: 80.1875px;"><s>flag is equal to official end term for same academic year, so 'ordinate end' = 27</s></td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;"><s>*Enrollment year terms:*</s></td><td style="height: 46.5938px;"><s>**27 - 25 + 1 = 23**</s></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td></tr></tbody></table>



*\*<s>note: there is a logic problem if there is an optional term 'sandwiched' between the official end and start terms that the student chooses to not attend, this will change the number of enrollment year terms. Do not allow optional terms in between required terms in the same academic year. A required academic year must be continuous.</s>*

<table border="1" id="bkmrk-student-fields-not-s-4" style="border-collapse: collapse; width: 99.7531%; height: 665.016px;"><colgroup><col style="width: 17.72%;"></col><col style="width: 12.2677%;"></col><col style="width: 70.1363%;"></col></colgroup><tbody><tr style="height: 67.4219px;"><td style="height: 67.4219px;">[Student Fields](https://bsa.lynops.com/books/personal-education-management-system/page/2-student-intake-functions "Student Fields")</td><td style="height: 67.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 67.4219px;">#### 2.5 Calculate Remaining Terms in Enrollment Grade Span

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*Calculate the remaining terms in the grade span. This is used for assigning plans. Plans can not be assigned that require more terms than remaining in the grade span.*</td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;">  
</td><td style="height: 80.1719px;">*Trigger*</td><td style="height: 80.1719px;">*When new student record is entered and only once on student intake.*

*note: this field is updated in the advancement workflow, but it will use very different logic than this initial value*

</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*requisite fields are not empty.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*This function runs after 2.4, find enrollment year terms.*</td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;"> </td><td style="height: 80.1719px;">Step 1</td><td style="height: 80.1719px;">Find the remaining academic years in the grade span: Subtract [Student](https://cs.studianova.org/admin/students) current grade level from [Grade Span](https://cs.studianova.org/admin/gradespans) End grade:

*[Grade Span](https://cs.studianova.org/admin/gradespans) End grade - [Student](https://cs.studianova.org/admin/students) current grade*

</td></tr><tr style="height: 57.7812px;"><td style="height: 57.7812px;">  
</td><td style="height: 57.7812px;"><s>Step 2</s></td><td style="height: 57.7812px;"><s>If the value above is zero then set remaining terms = enrollment year terms.</s>

<s>Else:</s>

</td></tr><tr style="height: 57.7812px;"><td style="height: 57.7812px;">  
</td><td style="height: 57.7812px;"><s>Step 3</s>

DONE

</td><td style="height: 57.7812px;"><s>Find required\_terms\_year in the [School Configuration](https://cs.studianova.org/admin/crmfields) </s>

<s>**<span style="color: rgb(224, 62, 45);">NOTE: NEED TO ADD THIS FIELD TO CONFIGURATION PAGE</span>**</s>

</td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;">  
</td><td style="height: 80.1719px;">Step 4</td><td style="height: 80.1719px;">Multiply number of required terms times the number of remaining years in the grade span

*required\_terms\_year X ([Grade Span](https://cs.studianova.org/admin/gradespans) End grade - [Student](https://cs.studianova.org/admin/students) current grade)*

</td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;">  
</td><td style="height: 80.1719px;">Step 5</td><td style="height: 80.1719px;">Add [Student](https://cs.studianova.org/admin/students) Enrollment year terms to above:

[S*tudent*](https://cs.studianova.org/admin/students) *Enrollment year terms + required\_terms\_year X ([Grade Span](https://cs.studianova.org/admin/gradespans) End grade - [Student](https://cs.studianova.org/admin/students) current grade)*

</td></tr><tr style="height: 38.375px;"><td style="height: 38.375px;">END</td><td style="height: 38.375px;">  
</td><td style="height: 38.375px;">  
</td></tr></tbody></table>

# 3. Create Student Term Records

### Function Objectives  


- Make a new set of [student term](https://cs.studianova.org/admin/studentterms) records for a new student until the end of the [grade span](https://cs.studianova.org/admin/gradespans).
- Make a new set of student terms when a student progresses into a new grade span.
- Make one student term record for every term the student is planning to attend in the associated grade span.


### Information Required for this Function

#### ***From the student table, we know the following fields:***

- Student's school start term - the school term the student starts in
- Grade level - the students current grade level
- Grade span - the planning horizon for that student based on their grade level
- Grade span end grade - the end grade field from the associated grade span record

#### ***From the school term we know the following fields:***

- Ordinate - the sequence of school terms, adding 1 to the ordinate finds the next record in the sequence
- Flag field - official end term is referenced from the associated [term label](https://cs.studianova.org/admin/termlabels) record

#### ***Required records (must already be created)***

- Academic year records until the end of the grade span
- School Term Records until the end of the grade span


### New Students

All functions in [2. Student Record Intake Functions ](https://bsa.lynops.com/books/personal-education-management-system/page/2-student-record-intake-functions "2. Student Record Intake Functions") must be run on a new [student](https://cs.studianova.org/admin/students) record before this function can be run.

#####   


### Recurring Students

A recurring student already has at least one student term in the system. The last student term is found by the maximum student sequence field value.

#####   


### Grade Spans

The student terms records are created from the point the student enters the school until the end of the student's assigned grade span. Grade spans are automatically updated when the student's grade level increased to land in a new grade span. When the student enters a new grade span, this function is run again.

For example, If the student is promoted from grade 5 to grade 6, and grade 6 is in a different grade span (like US middle school) then this change will trigger that all the student term records will be created until the student has completed 8th grade. The student terms for the next grade span (high school) will not be created until the student is promoted into the next grade span.

#####   


### Student Term's Student Sequence

The [student term](https://cs.studianova.org/admin/studentterms) student sequence stores the sequence of the records in the order the student will take them. Student Sequence is a continuously increasing integer value from 1, the first term at the school, until the student has graduated from all available grade levels.

For example, a student enters the fall term of kindergarten, the school has defined two required school terms. 13 years later, the student's last term (13x2 = 26) will have a student sequence of 26.

#####   


### Student Term at\_grade

The student term must store the ***predicted*** grade level of the student for that specific term in the ***at\_grade*** field. At first, the at\_grade is the starting grade level of the student, after the end of the academic year, the student's at\_grade will increase.

The at\_grade is NOT the same information as the student's current grade level. Only in for the current term will the at\_grade be the current grade level.

#####   


### Optional and Required School terms

Schools may configure optional terms, for example a summer term that students may or may not take. Student terms are made for both optional and required terms.


### Student Term Name

The student term name captures the most relevant information, the school term label, the student information, and the grade the student was at during that term. Student Term name is default field value the user may not change.

<p class="callout info"><span style="font-weight: 400;">Set the student term name to concatenate: Associated Term Name, Associated student initials, Student Code, “GL” grade level number (use at\_grade value), e</span><span style="font-weight: 400;">xample from Kassidy’s Record: **Spring 2023 KKB14 GL3**</span></p>

### Discussion

#### Trigger to increase the at\_grade

When a *<span style="text-decoration: underline;">student</span> term* is created, the record is associated to a *<span style="text-decoration: underline;">school</span> term,* which has been linked to the *term <span style="text-decoration: underline;">label</span>* record. If that term label record is flagged (flag field) as the official end term of the school year, the student's grade level will increase by one. At the end of the school year, students increase in grade level, so the at\_grade value increases for the next student term.

#### Determining the end of the grade span

A student is at the end of a grade span when their grade level is promoted to the next grade level that falls into the next grade span. The predicted grade level is stored in the student term at\_grade field. When the (at\_grade field value + 1) is greater that the end grade level in the grade span, then the function ends and no new student terms are created.

So if the student's predicted at\_grade is greater than the end grade of the associated grade\_span, then the student's predicted grade level exceeds the grade span, student term records do not need to be created for the next span.

<table border="1" id="bkmrk-calendar-functions-n-1" style="width: 100%; height: 886.844px;"><colgroup><col style="width: 20.5175%;"></col><col style="width: 11.2501%;"></col><col style="width: 68.2324%;"></col></colgroup><tbody><tr style="height: 92.8125px;"><td style="height: 92.8125px;">[3. Create Student Term Records](https://bsa.lynops.com/books/personal-education-management-system/page/3-create-student-term-records)</td><td style="height: 92.8125px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 92.8125px;">#### 3.1 Automatically Create Student Term Records for New Students

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*After a new student has been added, create student term records until the end of the grade span. Students can not be enrolled in classes unless there are student term records.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Trigger*</td><td style="height: 29.7969px;">*Managed by the New Student Intake Work flow.*</td></tr><tr style="height: 34.5938px;"><td style="height: 34.5938px;">  
</td><td style="height: 34.5938px;">*Conditions*</td><td style="height: 34.5938px;">*No required fields are empty.*</td></tr><tr style="height: 35.5938px;"><td style="height: 35.5938px;">  
</td><td style="height: 35.5938px;">*Sequence*</td><td style="height: 35.5938px;">*This function follows 2.0 functions during student intake work flow*</td></tr><tr style="height: 83.1875px;"><td style="height: 83.1875px;">Start with the school start term associated to the student in function 2</td><td style="height: 83.1875px;">Step 1</td><td style="height: 83.1875px;">Find the ordinate of the [student ](https://cs.studianova.org/admin/students)record school start [term](https://cs.studianova.org/admin/terms) ("previous ordinate")</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 2</td><td style="height: 35.3906px; padding-left: 40px;">Create a new [student term](https://cs.studianova.org/admin/studentterms) record</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 3</td><td style="padding-left: 40px; height: 35.3906px;">Associate new [student term](https://cs.studianova.org/admin/studentterms) record to [student ](https://cs.studianova.org/admin/students)record school start [term](https://cs.studianova.org/admin/terms)</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 4</td><td style="height: 35.3906px; padding-left: 40px;">Associate new [student term](https://cs.studianova.org/admin/studentterms) record to the student </td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 5</td><td style="padding-left: 40px; height: 35.3906px;">Set the [student term](https://cs.studianova.org/admin/studentterms) record at\_grade field = [student ](https://cs.studianova.org/admin/students)record current grade\_level</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 6</td><td style="padding-left: 40px; height: 35.3906px;">Set [student term](https://cs.studianova.org/admin/studentterms) record student sequence = 1</td></tr><tr style="height: 49.5938px;"><td style="height: 49.5938px;">Check if the term is the last term in year</td><td style="height: 49.5938px;">Step 7</td><td style="height: 49.5938px;">If the [student ](https://cs.studianova.org/admin/students)record school start [term](https://cs.studianova.org/admin/terms) flag = official end term, then

</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">if last term, then increase grade level</td><td style="height: 46.5938px;">Step 8</td><td style="padding-left: 40px; height: 46.5938px;">at\_grade = previous at\_grade + 1</td></tr><tr style="height: 66.3906px;"><td style="height: 66.3906px;">Check if new grade level exceeds grade span</td><td style="height: 66.3906px;">Step 9</td><td style="height: 66.3906px;">If at\_grade is greater than [student ](https://cs.studianova.org/admin/students)record [grade span](https://cs.studianova.org/admin/gradespans) end grade, then <span style="color: rgb(224, 62, 45);">**STOP**</span>

Else

</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">increase the ordinate to find the next school term</td><td style="height: 63.3906px;">Step 10</td><td style="height: 63.3906px;">New ordinate = previous ordinate + 1</td></tr><tr style="height: 49.5938px;"><td style="height: 49.5938px;">Find the next school term</td><td style="height: 49.5938px;">Step 11</td><td style="height: 49.5938px;">Find the [school term](https://cs.studianova.org/admin/terms) record with the new ordinate from above - *the next term record*</td></tr><tr style="height: 35.375px;"><td style="height: 35.375px;">repeat</td><td style="height: 35.375px;">Step 12</td><td style="height: 35.375px; padding-left: 40px;">Create a new [student term](https://cs.studianova.org/admin/studentterms) record</td></tr><tr><td>  
</td><td>Step 13</td><td style="padding-left: 40px;">Associate new [student term](https://cs.studianova.org/admin/studentterms) record to [school term](https://cs.studianova.org/admin/terms) record with the new ordinate (step 10)</td></tr><tr><td>  
</td><td>Step 14</td><td style="padding-left: 40px;">Associate new [student term](https://cs.studianova.org/admin/studentterms) record to the student </td></tr><tr><td>  
</td><td>Step 15</td><td style="padding-left: 40px;">Set the [student term](https://cs.studianova.org/admin/studentterms) record at\_grade field = new at\_grade (step 8)</td></tr><tr><td>  
</td><td>Step 16</td><td style="padding-left: 40px;">Set [student term](https://cs.studianova.org/admin/studentterms) record student sequence = previous student sequence +1</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">check in the new school term is the end of the year</td><td style="height: 29.7969px;">Step 17</td><td style="height: 29.7969px;">If the [school term](https://cs.studianova.org/admin/terms) record with the new ordinate flag = official end grade then **<span style="color: rgb(224, 62, 45);">STOP</span>**

Else

</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"> </td><td style="height: 29.7969px;">Step 18</td><td style="height: 29.7969px;">Go to Step 8</td></tr><tr><td>END</td><td>  
</td><td>  
</td></tr></tbody></table>

<table border="1" id="bkmrk-3.-create-student-te" style="width: 100%; height: 1313.77px;"><colgroup><col style="width: 20.5192%;"></col><col style="width: 11.2485%;"></col><col style="width: 68.2324%;"></col></colgroup><tbody><tr style="height: 92.8125px;"><td style="height: 92.8125px;">[3. Create Student Term Records](https://bsa.lynops.com/books/personal-education-management-system/page/3-create-student-term-records)</td><td style="height: 92.8125px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 92.8125px;">#### 3.2 Automatically Create Student Term Records for recurring students

</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">  
</td><td style="height: 63.3906px;">*Purpose*</td><td style="height: 63.3906px;">*When a student has advanced to a new grade span, create student term records until the end of the grade span. Students can not be enrolled in classes unless there are student term records.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Trigger*</td><td style="height: 29.7969px;">*Managed by the advancement workflow*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Conditions*</td><td style="height: 46.5938px;">*No required fields are empty. There must be at least one student term record already created - from function 3.1*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Sequence*</td><td style="height: 46.5938px;">*After a student has been advanced to a new grade level, this is part of the advancement workflow*</td></tr><tr style="height: 102.562px;"><td style="height: 102.562px;">Check grade level matches associated grade span.</td><td style="height: 102.562px;">Step 1</td><td style="height: 102.562px;">If [student ](https://cs.studianova.org/admin/students)record current grade level is not equal to [student ](https://cs.studianova.org/admin/students)record [grade span](https://cs.studianova.org/admin/gradespans) start grade then <span style="color: rgb(224, 62, 45);">**STOP**</span>

Provide user an error that student terms can not be made for this grade span.

Else

</td></tr><tr style="height: 52.1875px;"><td style="height: 52.1875px;">Find the last student term.</td><td style="height: 52.1875px;">Step 2</td><td style="height: 52.1875px;">Find the last [student term](https://cs.studianova.org/admin/studentterms) record, the [student term](https://cs.studianova.org/admin/studentterms) record with the maximum student sequence field value.</td></tr><tr style="height: 124.953px;"><td style="height: 124.953px;">Check the at\_grade</td><td style="height: 124.953px;">Step 3</td><td style="height: 124.953px;">If the at\_grade field in the last [student term](https://cs.studianova.org/admin/studentterms) record is greater than or equal to the student grade span start grade then **<span style="color: rgb(224, 62, 45);">STOP </span>**

<span style="color: rgb(0, 0, 0);">Provide user an error note that terms can not be made for this grade span.</span>

<span style="color: rgb(0, 0, 0);">Else</span>

</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 4</td><td style="height: 29.7969px;"><span style="color: rgb(0, 0, 0);">set at\_grade = student current grade level</span></td></tr><tr style="height: 83.1875px;"><td style="height: 83.1875px;">Find the ordinate of the associated school term</td><td style="height: 83.1875px;">Step 5</td><td style="height: 83.1875px;">Find the ordinate of the [school term](https://cs.studianova.org/admin/terms) record associated to the last student term record found above.</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 6</td><td style="height: 35.3906px; padding-left: 40px;">Create a new [student term](https://cs.studianova.org/admin/studentterms) record</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 7</td><td style="padding-left: 40px; height: 35.3906px;">Associate new [student term](https://cs.studianova.org/admin/studentterms) record to [school term](https://cs.studianova.org/admin/terms) record</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 8</td><td style="height: 35.3906px; padding-left: 40px;">Associate new [student term](https://cs.studianova.org/admin/studentterms) record to the student </td></tr><tr style="height: 52.1875px;"><td style="height: 52.1875px;">  
</td><td style="height: 52.1875px;">Step 9</td><td style="padding-left: 40px; height: 52.1875px;">Set the [student term](https://cs.studianova.org/admin/studentterms) record at\_grade field to at\_grade</td></tr><tr style="height: 52.1875px;"><td style="height: 52.1875px;">  
</td><td style="height: 52.1875px;">Step 10</td><td style="padding-left: 40px; height: 52.1875px;">Set [student term](https://cs.studianova.org/admin/studentterms) record student sequence = sequence</td></tr><tr style="height: 49.5938px;"><td style="height: 49.5938px;">Check if the term is the last term in year</td><td style="height: 49.5938px;">Step 11</td><td style="height: 49.5938px;">If the [student ](https://cs.studianova.org/admin/students)record school start [term](https://cs.studianova.org/admin/terms) flag = official end term, then

</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">if last term, then increase grade level</td><td style="height: 46.5938px;">Step 12</td><td style="padding-left: 40px; height: 46.5938px;">at\_grade = previous at\_grade + 1</td></tr><tr style="height: 66.3906px;"><td style="height: 66.3906px;">Check if new grade level exceeds grade span</td><td style="height: 66.3906px;">Step 13</td><td style="height: 66.3906px;">If at\_grade is greater than [student ](https://cs.studianova.org/admin/students)record [grade span](https://cs.studianova.org/admin/gradespans) end grade, then <span style="color: rgb(224, 62, 45);">**STOP**</span>

Else

</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">increase the ordinate to find the next school term</td><td style="height: 63.3906px;">Step 14</td><td style="height: 63.3906px; padding-left: 40px;">New ordinate = previous ordinate + 1</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">increase the sequence for the next student term record</td><td style="height: 29.7969px;">Step 15</td><td style="padding-left: 40px; height: 29.7969px;">New sequence = sequence + 1</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"> </td><td style="height: 29.7969px;">Step 16</td><td style="height: 29.7969px;">Find the School term record with the new ordinate</td></tr><tr><td>  
</td><td>Step 17</td><td>Go to Step 6</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">END</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;"> </td></tr></tbody></table>

# 4. Programs of Study and Subject Requirements

The program of study (plan) record must be linked to a grade\_span record. There can be only one grade\_span per program plan as programs plans can not cross over a grade\_span.

However, a plan may cover a period less than the grade span, for example there may be a 6th grade Remedial Plan that covers just one year of the 6th-8th grade span. After that plan is complete, the student is re-evaluated and placed in a new plan.

#####   


### Auto Enter Start and End Grade based on related Grade Span

When entering a new Program of Study, the user must select a grade span. The grade span has a start grade and end grade, covering the entire span. Default the start grade fields and end grade fields in the program of study to the same as the grade span, then let the user override them.

<table border="1" id="bkmrk-calendar-functions-n-1" style="width: 100%; height: 329.391px;"><colgroup><col style="width: 11.6193%;"></col><col style="width: 12.6056%;"></col><col style="width: 75.7752%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Programs of Study](https://bsa.lynops.com/books/personal-education-management-system/page/4-programs-of-study-and-subject-requirements-tbd)</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 4.1 **Auto-enter start and end grade**


</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">  
</td><td style="height: 63.3906px;">*Purpose*</td><td style="height: 63.3906px;">*The user will select the grade span for the plan. The grade span has start and end grade levels. Auto enter the same start and end grade levels into the plan when the grade span is selected to reduce user workload.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Trigger*</td><td style="height: 29.7969px;">*A change in grade span in the plan record.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*Grade spans are created.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Sequence*</td><td style="height: 46.5938px;">*After the record is created, when ever the grade span changes.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 1</td><td style="height: 29.7969px;">Set [Plan](https://cs.studianova.org/admin/plans) start grade equal to [Grade Span](https://cs.studianova.org/admin/gradespans) start grade</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 2</td><td style="height: 29.7969px;">Set [Plan](https://cs.studianova.org/admin/plans) end grade equal to [Grade Span](https://cs.studianova.org/admin/gradespans) end grade</td></tr><tr><td>  
</td><td>Step 3</td><td>The user can then update the grade levels, so do not allow save if

[Plan](https://cs.studianova.org/admin/plans) start grade is greater than end grade,

[Plan](https://cs.studianova.org/admin/plans) end grade &gt;[Grade Span](https://cs.studianova.org/admin/gradespans) end grade

[Plan](https://cs.studianova.org/admin/plans) start grade &lt; [Grade Span](https://cs.studianova.org/admin/gradespans) start grade

Show the message "Error in plan grade levels"

</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">END</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;"> </td></tr></tbody></table>

<table border="1" id="bkmrk-programs-of-study-no" style="width: 100%; height: 449.891px;"><colgroup><col style="width: 11.6193%;"></col><col style="width: 10.5039%;"></col><col style="width: 77.8768%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Programs of Study](https://bsa.lynops.com/books/personal-education-management-system/page/4-programs-of-study-and-subject-requirements-tbd)</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 4.2 **Auto-enter total terms**


</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*The program plan stores the total terms of the plan, this may be calculated from the start and end grade. However, the user may change the values.*</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">*Trigger*</td><td style="height: 35.3906px;">*Any change to the [Plan](https://cs.studianova.org/admin/plans) start or end grade fields* </td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Sequence*</td><td style="height: 46.5938px;">  
</td></tr><tr style="height: 52.1875px;"><td style="height: 52.1875px;">  
</td><td style="height: 52.1875px;">Step 1</td><td style="height: 52.1875px;">Set [Plan](https://cs.studianova.org/admin/plans) total terms equal to ([Plan](https://cs.studianova.org/admin/plans) end grade - [Plan](https://cs.studianova.org/admin/plans) start grade + 1) x [School Configuration](https://cs.studianova.org/admin/crmfields) terms\_per\_year</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 2</td><td style="height: 35.3906px;">Set [Plan](https://cs.studianova.org/admin/plans) end grade equal to [Grade Span](https://cs.studianova.org/admin/gradespans) end grade</td></tr><tr style="height: 86.9375px;"><td style="height: 86.9375px;">  
</td><td style="height: 86.9375px;">Step 3</td><td style="height: 86.9375px;">The user can then update the grade levels, so do not allow save if

[Plan](https://cs.studianova.org/admin/plans) total terms &gt; [Grade Span](https://cs.studianova.org/admin/gradespans) total terms

Show the message "Error in total terms"

</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">END</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;"> </td></tr></tbody></table>

### Subject Requirements

The subject requirement records specify how many units of the subject a student must take under that specific plan. They relate the subjects to the programs in a many to many relationship. There will be multiple subject requirement records for each plan, but each subject requirement only applies to one plan. Multiple subject requirement records will be related to a single subject record.

For example, under the honors program, the requirements for English are 40 units ( four years, two terms). But under the basic diploma, the subject requirements for English is only three years, or 30 units.

The user creates subject requirements records when making a plan of study, then selects the classes that fulfill that requirement by creating template records.

<table border="1" id="bkmrk-programs-of-study-co" style="width: 100%; height: 443.109px;"><colgroup><col style="width: 11.6193%;"></col><col style="width: 12.3587%;"></col><col style="width: 76.0221%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Programs of Study](https://bsa.lynops.com/books/personal-education-management-system/page/4-programs-of-study-and-subject-requirements-tbd)</td><td style="height: 70.4219px;"><span style="color: rgb(22, 145, 121);">Completed</span></td><td style="height: 70.4219px;">#### 4.3 **Concatenate Subject Requirement Name**


</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*Ensure a unique record name that reflects all relevant information and avoid confusing subject requirements with subjects.*</td></tr><tr style="height: 35.375px;"><td style="height: 35.375px;">  
</td><td style="height: 35.375px;">*Trigger*</td><td style="height: 35.375px;">*Any change fields used to create the name*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Sequence*</td><td style="height: 46.5938px;">  
</td></tr><tr style="height: 52.1875px;"><td style="height: 52.1875px;">  
</td><td style="height: 52.1875px;">Step 1</td><td style="height: 52.1875px;"><span style="font-weight: 400;">Concatenate: [Subject Requirement](https://cs.studianova.org/admin/subjectrequirement) Subject Name “.” Plan Name “.U” Units Required : Example: “English.Standard 23.U20”</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">END</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;"> </td></tr></tbody></table>

# 5. Create Set of Enrollment Records - TBD

### Launching this process

The student plan links the student and the selected program plan. The program plan has a set of child records that specify which classes the student should take in sequential terms, the template records. When a student plan is changed from future to active, then the template records associated with the linked program plan are used to create a set of enrollment records. Enrollment records link the student, the student term, and the class.

<p class="callout info">The key trigger for the creation of enrollment records is the change of a student plan record from future to active. </p>

#####   


### What we Know

- From the active student plan record we know the corresponding program plan record, and the corresponding template records. From the template records, we know: 
    - the class linked to the class list table in which the student needs to be enrolled
    - the term the class is supposed to be take in, from the term label
    - the grade level the class should be take in, "at\_grade"
- From the student plan record we know the Program start term
- From the **program start term**, 
    - We can find the corresponding ***student*** start term
    - From the ***student*** start term: 
        - We can find the grade level the student will be at in the term, the 'at grade'
        - We can find the term label for that student term

#####   


### Match the templates to the student terms to create enrollment records

***For each template record associated to the activated student plan (though the linked program plan)***

<p class="callout info">Match the student term to template: find a student term record where student term at\_grade = template at\_grade AND student term label = template term label. There will be multiple templates that match these conditions (one template for each class to take in that term).</p>

<p class="callout info">*Note: The student term records can be limited to those withing the grade span of the associated program plan, to reduce time to find a match.*</p>

<p class="callout info">For each template that matched the conditions above, create an enrollment record, and associate that enrollment record with the student term.</p>

<p class="callout info">Set enrollment class, enrollment at\_grade, enrollment term label, enrollment curriculum, enrollment curriculum option, enrollment set, enrollment subject to the values in the corresponding template record.</p>

<p class="callout info">If there is no match between template and student term record based on at\_grade and term label, proceed to the next template record. *Note: If no student term records found, they will also not be found for multiple templates.*</p>

<p class="callout info">Exit the matching when every single template record has been considered.</p>

#### ***New Students***

For new students, PEMS anticipates that the student may be joining the school in the middle of a term or program plan, and so no enrollments records will be created for terms that have passed.

If there were no student terms created, then there will be no match and no enrollments created. In this way we do not create enrollments for student terms where the student was not enrolled.

#### Suspend a Plan

A student may need to change the plan they are working towards. This may occur after some enrollment records created by the plan are completed and others are not completed. The first step is to suspend the current plan.

To suspend the plan, the active student plan status field is set to 'suspended' by the user. When a student plan is suspended, all the enrollment records that are active or completed will remain unchanged. By default, the student will remain in the enrollments until the end of the term. All **incomplete** enrollments will be permanently deleted from the system when the plan is suspended.

<p class="callout info">Key Trigger: Student plan is changed from Active to Suspended</p>

<p class="callout info">Find all incomplete enrollment records associated to the suspended student plan and delete them</p>

### New Plan Assigned to Recurring Students

Whether a student is being assigned a new plan because they completed a plan or because the user suspended their plan, the new plan may require the student to take classes they may have already completed, or are in the process of completing. Therefore a check needs to be run to see if enrollment records exist with the same classes as the template records exist. Since plans never cross a grade span, this check only needs to be performed on enrollment records within grade span in question. If enrollment records exist with the same classes, then the corresponding template records will be excluded and no new classes will be made.

#### ***Complete enrollment records in the grade span***

When making enrollment records, PEMS first checks if there are any enrollment records in the student's current grade span. Each enrollment record has an at\_grade, the grade level the enrollment is to be completed or has been completed. If there are enrollment records created with the grade span of the plan to be assigned, and these enrollment record are ***complete,*** no new enrollment record will be created from the the templates, and that corresponding template will be *excluded* from the matching algorithm specified above.

#### ***Active enrollment records in the grade span***

If there is an ***active*** enrollment record with the same class as the template record, PEMS checks the curriculum. A different plan may have a different curriculum selected for each class, even though the class is the same. In this case, the user may want to change the student's curriculum. This could happens early in the school term, if a student found that college preparation work was to difficult and wanted to pursue a basic diploma. The user may want to choose to change the curriculum but keep the same class. *Note: a change to curriculum would cause the corresponding Moodle class to be suspended, and the student assigned to a different course.*

However, late in the term, the student will have no chance to complete a new curriculum, and so the better choice will be to complete the chosen classes.

*<span style="color: #e03e2d;"><span style="color: #e03e2d;">In order to manage this use case, a new field needs to be created called "Curriculum Update" The default field value will be "Retain Current Curricula." In this case, we assume there is no change to curricula for active enrollment records. The user must change this field value to "Change Curricula" in order to the curricula to be update in the active enrollment records.</span></span>*

#### ***For recurring students with new plans:***

<p class="callout info">Identify if there is a subset of enrollment records with at\_grade field within the grade span of the newly assigned plan. If there are any enrollment records that meet this criteria, continue. If no records found, skip this check</p>

<p class="callout info">Find enrollment records that have status = ***complete*** in the student's current grade span. Find the matching template record in the new plan by matching the class fields</p>

<p class="callout info">Exclude any template records from the enrollment algorithm that have been matched by the class field to any completed enrollment record</p>

<p class="callout info">Find enrollment records that have status = ***active*** in the student's current grade span. Exclude any template records from the enrollment algorithm that have been matched by the class field to any completed enrollment record.</p>

<p class="callout info">Only if the new plan has the field "Curriculum update" = "change curricula" then update the curriclum field in the enrollment record to match the curriculum field in the template template record (that has same class).</p>

<p class="callout info">Proceed to create enrollment records as described in the enrollment algorithm, but exclude the records that have already been matched to active/completed enrollments.</p>

# 6. Transcript GPA Calculation

### Reference Information

#### [Transcript UI](https://bsa.lynops.com/books/personal-education-management-system/page/transcript-ui "Transcript UI")

{{@205#bkmrk-view-%C2%A0googlesheet-ex}}

#### [Enrollments Table](https://bsa.lynops.com/books/personal-education-management-system/page/enrollments-table "Enrollments Table")

{{@109#bkmrk-all-the-grade-points}}

#### [Student Terms](https://bsa.lynops.com/books/personal-education-management-system/page/student-terms-table)

{{@104#bkmrk-there-are-four-gpa-f}}

### GPA Functions

<table border="1" id="bkmrk-calendar-functions-n" style="width: 100%; height: 352.75px;"><colgroup><col style="width: 12.236%;"></col><col style="width: 13.104%;"></col><col style="width: 74.6601%;"></col></colgroup><tbody><tr style="height: 92.8125px;"><td style="height: 92.8125px;">[GPA Calculations](https://bsa.lynops.com/books/personal-education-management-system/page/6-transcript-gpa-calculation-tbd)</td><td style="height: 92.8125px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 92.8125px;">#### 6.1 Calculate Grade Point Fields in Enrollment record

</td></tr><tr style="height: 57.7812px;"><td style="height: 57.7812px;">  
</td><td style="height: 57.7812px;">*Purpose*</td><td style="height: 57.7812px;">*Based on the letter grade, look up the grade points from the [Marking System](https://cs.studianova.org/admin/marksystem) table. The [Marking System](https://cs.studianova.org/admin/marksystem) table allows schools to customize the points they give based on a letter grade.*</td></tr><tr style="height: 57.7812px;"><td style="height: 57.7812px;">  
</td><td style="height: 57.7812px;">*Trigger*</td><td style="height: 57.7812px;">*Update whenever *[enrollment](https://cs.studianova.org/admin/enrollments) status = completed, and then whenever t*here is a change to the [enrollment](https://cs.studianova.org/admin/enrollments) letter grade.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Conditions*</td><td style="height: 46.5938px;">*[Marking System](https://cs.studianova.org/admin/marksystem) table has been configured.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*This function can only run after students have been enrolled in courses.*</td></tr><tr style="height: 38.1875px;"><td style="height: 38.1875px;">all fields are first set to unweighted values</td><td style="height: 38.1875px;">Step 1</td><td style="height: 38.1875px;">Based on [enrollment](https://cs.studianova.org/admin/enrollments) letter grade, look up grade points in [M](https://cs.studianova.org/admin/marksystem)[arking System](https://cs.studianova.org/admin/marksystem) table

Set [enrollment](https://cs.studianova.org/admin/enrollments) grade points to [M](https://cs.studianova.org/admin/marksystem)[arking System](https://cs.studianova.org/admin/marksystem) grade points.

Set [enrollment](https://cs.studianova.org/admin/enrollments) <span style="text-decoration: underline;">weighted</span> grade points to [M](https://cs.studianova.org/admin/marksystem)[arking System](https://cs.studianova.org/admin/marksystem) **<span style="color: rgb(224, 62, 45);">grade points.</span>**

Set [enrollment](https://cs.studianova.org/admin/enrollments) alternate grade points to [M](https://cs.studianova.org/admin/marksystem)[arking System](https://cs.studianova.org/admin/marksystem) alternate grade points.

Set [enrollment](https://cs.studianova.org/admin/enrollments) alternate <span style="text-decoration: underline;">weighted </span>grade points to [M](https://cs.studianova.org/admin/marksystem)[arking System](https://cs.studianova.org/admin/marksystem) alternate **<span style="color: rgb(224, 62, 45);">grade points.</span>**

</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">weighted fields are increased only when appropriate</td><td style="height: 29.7969px;">Step 2</td><td style="height: 29.7969px;">Look up [enrollment](https://cs.studianova.org/admin/enrollments) | [curriculum](https://cs.studianova.org/admin/curriculum) | [Compliance Tags](https://cs.studianova.org/admin/compliancetags).

If associated curriculum has ANY compliance tag with "Weight GPA" = yes Then:

Set [enrollment](https://cs.studianova.org/admin/enrollments) weighted points to [M](https://cs.studianova.org/admin/marksystem)[arking System](https://cs.studianova.org/admin/marksystem) weighted points.

Set [enrollment](https://cs.studianova.org/admin/enrollments) alternate weighted points to [M](https://cs.studianova.org/admin/marksystem)[arking System](https://cs.studianova.org/admin/marksystem) alternate weighted points.

</td></tr><tr><td>fields are zeroed if excluded from gpa calculations</td><td>Step 3</td><td>Look up [enrollment](https://cs.studianova.org/admin/enrollments) | [Class ](https://cs.studianova.org/admin/classlist)| Exclude GPA

If Exclude GPA = standard GPA then

Set [enrollment](https://cs.studianova.org/admin/enrollments) Grade Points to zero

Set [enrollment](https://cs.studianova.org/admin/enrollments) Weighted Grade Points to zero

If Exclude GPA = alternate GPA then

Set [enrollment](https://cs.studianova.org/admin/enrollments) alternate grade points to zero

Set [enrollment](https://cs.studianova.org/admin/enrollments) alternate weighted Grade Points to zero

</td></tr><tr><td>END</td><td>  
</td><td>  
</td></tr></tbody></table>

#### 6.1 Test Case

<table border="1" id="bkmrk-enrollment-grades-cl" style="border-collapse: collapse; width: 100%; height: 335.36px;"><colgroup><col style="width: 8.77627%;"></col><col style="width: 11.1248%;"></col><col style="width: 10.754%;"></col><col style="width: 11.2485%;"></col><col style="width: 14.8316%;"></col><col style="width: 16.6888%;"></col><col style="width: 14.2151%;"></col><col style="width: 12.3609%;"></col></colgroup><tbody><tr style="height: 96.9844px;"><td style="height: 96.9844px;">Enrollment Grades</td><td style="height: 96.9844px;">Class is Excluded Standard</td><td style="height: 96.9844px;">Class is Excluded Alternate</td><td style="height: 96.9844px;">Curriculum tag is Weighted = yes</td><td style="height: 96.9844px;">Marking System Grade Points</td><td style="height: 96.9844px;">Marking System Weighted Grade Points</td><td style="height: 96.9844px;">Marking System alternate Grade Points</td><td style="height: 96.9844px;">Marking System Alternate Weighted Grade Points</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">A+</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">yes</td><td style="height: 29.7969px;">4.0</td><td style="height: 29.7969px;">5.0</td><td style="height: 29.7969px;">4.0</td><td style="height: 29.7969px;">5.0</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">A+</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;"><span style="color: rgb(224, 62, 45);">no</span></td><td style="height: 29.7969px;">4.0</td><td style="height: 29.7969px;"><span style="color: rgb(224, 62, 45);">4.0</span></td><td style="height: 29.7969px;">4.0</td><td style="height: 29.7969px;"><span style="color: rgb(224, 62, 45);">4.0</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">B-</td><td style="height: 29.7969px;">Excluded</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">no</td><td style="height: 29.7969px;">0</td><td style="height: 29.7969px;">0</td><td style="height: 29.7969px;">3.0</td><td style="height: 29.7969px;">4.0</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">C</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;"><span style="color: rgb(224, 62, 45);">no</span></td><td style="height: 29.7969px;">2.0</td><td style="height: 29.7969px;"><span style="color: rgb(224, 62, 45);">2.0</span></td><td style="height: 29.7969px;">2.0</td><td style="height: 29.7969px;"><span style="color: rgb(224, 62, 45);">2.0</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">D-</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">yes</td><td style="height: 29.7969px;">0.9</td><td style="height: 29.7969px;">1.9</td><td style="height: 29.7969px;">1.0</td><td style="height: 29.7969px;">2.0</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">B</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Excluded</td><td style="height: 29.7969px;">no</td><td style="height: 29.7969px;">3.0</td><td style="height: 29.7969px;">3.0</td><td style="height: 29.7969px;">0</td><td style="height: 29.7969px;">0</td></tr></tbody></table>


### Marking System Table Example

[![image.png](https://bsa.lynops.com/uploads/images/gallery/2024-02/scaled-1680-/image.png)](https://cs.studianova.org/admin/marksystem)

<table border="1" id="bkmrk-gpa-calculations-not" style="width: 100%; height: 926.189px;"><colgroup><col style="width: 12.236%;"></col><col style="width: 13.104%;"></col><col style="width: 74.6601%;"></col></colgroup><tbody><tr style="height: 92.8125px;"><td style="height: 92.8125px;">[GPA Calculations](https://bsa.lynops.com/books/personal-education-management-system/page/6-transcript-gpa-calculation-tbd)</td><td style="height: 92.8125px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 92.8125px;">#### 6.2 Calculate Student Term GPAs

</td></tr><tr style="height: 57.75px;"><td style="height: 57.75px;">  
</td><td style="height: 57.75px;">*Purpose*</td><td style="height: 57.75px;">*The GPAs are calculated based on the points awarded for each enrollment and the units earned for each enrollment record.*</td></tr><tr style="height: 57.75px;"><td style="height: 57.75px;">  
</td><td style="height: 57.75px;">*Trigger*</td><td style="height: 57.75px;">*When ever there is a change to the any of the points fields.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Conditions*</td><td style="height: 46.5938px;">*Points fields are not empty.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*This function runs after the points have been updated.*</td></tr><tr style="height: 38.1875px;"><td style="height: 38.1875px;">  
</td><td style="height: 38.1875px;">Step 1</td><td style="height: 38.1875px;">Calculate [Student Term](https://cs.studianova.org/admin/studentterms) Units Earned. Sum all associated [enrollment](https://cs.studianova.org/admin/enrollments) units earned.

</td></tr><tr style="height: 111.547px;"><td style="height: 111.547px;">  
</td><td style="height: 111.547px;">Step 2</td><td style="height: 111.547px;">Calculate <span style="text-decoration: underline;">standard adjusted</span> [Student Term](https://cs.studianova.org/admin/studentterms) Units Earned.

Sum all units earned from all [enrollment](https://cs.studianova.org/admin/enrollments) records where | [Class ](https://cs.studianova.org/admin/classlist)| Exclude GPA = standard

Subtract excluded units (above) from [Student Term](https://cs.studianova.org/admin/studentterms) Units Earned

</td></tr><tr style="height: 109.547px;"><td style="height: 109.547px;">  
</td><td style="height: 109.547px;">Step 3</td><td style="height: 109.547px;">Calculate <span style="text-decoration: underline;">alternate adjusted</span> [Student Term](https://cs.studianova.org/admin/studentterms) Units Earned.

Sum all units earned from all [enrollment](https://cs.studianova.org/admin/enrollments) records where | [Class ](https://cs.studianova.org/admin/classlist)| Exclude GPA = alternate

Subtract excluded units (above) from [Student Term](https://cs.studianova.org/admin/studentterms) Units Earned

</td></tr><tr style="height: 142.516px;"><td style="height: 142.516px;">  
</td><td style="height: 142.516px;">Step 4</td><td style="height: 142.516px;">Calculate [Student Term](https://cs.studianova.org/admin/studentterms) GPA:

Calculate <span style="text-decoration: underline;">total points</span>:

For each [enrollment](https://cs.studianova.org/admin/enrollments) record

sum (units earned x grade points)

GPA = <span style="text-decoration: underline;">total points</span> / standard adjusted units earned (step 2)

</td></tr><tr style="height: 133.516px;"><td style="height: 133.516px;">  
</td><td style="height: 133.516px;">Step 5</td><td style="height: 133.516px;">Calculate [Student Term](https://cs.studianova.org/admin/studentterms) Weighted GPA:

Calculate <span style="text-decoration: underline;">total points</span>:

For each [enrollment](https://cs.studianova.org/admin/enrollments) record

sum (units earned x weighted points)

GPA = <span style="text-decoration: underline;">total points</span> / standard adjusted units earned (step 2)

</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 6</td><td style="height: 35.3906px;">Calculate [Student Term](https://cs.studianova.org/admin/studentterms) Alternate GPA:

Calculate <span style="text-decoration: underline;">total points</span>:

For each [enrollment](https://cs.studianova.org/admin/enrollments) record,

sum (units earned x alternate grade points)

GPA = total points / alternate adjusted units earned (step 3)

</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 7</td><td style="height: 35.3906px;">Calculate [Student Term](https://cs.studianova.org/admin/studentterms) Alternate Weighted GPA:

Calculate <span style="text-decoration: underline;">total points</span>:

For each [enrollment](https://cs.studianova.org/admin/enrollments) record,

sum (units earned x alternate weighted grade points)

GPA = total points / alternate adjusted units earned (step 3)

</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">END</td><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;"></td></tr></tbody></table>

#### 6.2 Test Case

<table border="1" id="bkmrk-units-earned-standar" style="border-collapse: collapse; width: 100%; height: 309.36px;"><colgroup><col style="width: 18.4178%;"></col><col style="width: 9.39431%;"></col><col style="width: 11.3721%;"></col><col style="width: 11.8665%;"></col><col style="width: 12.4845%;"></col><col style="width: 12.7324%;"></col><col style="width: 12.7312%;"></col><col style="width: 11.1248%;"></col></colgroup><tbody><tr style="height: 80.1875px;"><td style="height: 80.1875px;">  
</td><td style="height: 80.1875px;">Units Earned</td><td style="height: 80.1875px;">Standard adjusted Units earned</td><td style="height: 80.1875px;">Alternate Adjusted Units Earned</td><td style="height: 80.1875px;">Grade Points</td><td style="height: 80.1875px;">Weighted Grade Points</td><td style="height: 80.1875px;">Alternate Grade Points</td><td style="height: 80.1875px;">Alternate Weighted Grade Points</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">enrollment 1</td><td style="height: 29.7969px;">5</td><td style="height: 29.7969px;">5</td><td style="height: 29.7969px;">5</td><td style="height: 29.7969px;">4.0</td><td style="height: 29.7969px;">5.0</td><td style="height: 29.7969px;">4.0</td><td style="height: 29.7969px;">5.0</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">enrollment 2 - excluded standard</td><td style="height: 46.5938px;">5</td><td style="height: 46.5938px;">0</td><td style="height: 46.5938px;">5</td><td style="height: 46.5938px;">0</td><td style="height: 46.5938px;">0</td><td style="height: 46.5938px;">2.0</td><td style="height: 46.5938px;">3.0</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">enrollment 3</td><td style="height: 29.7969px;">5</td><td style="height: 29.7969px;">5</td><td style="height: 29.7969px;">5</td><td style="height: 29.7969px;">3.0</td><td style="height: 29.7969px;">3.0</td><td style="height: 29.7969px;">3.0</td><td style="height: 29.7969px;">3.0</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">enrollment 4 - excluded alternate</td><td style="height: 46.5938px;">5</td><td style="height: 46.5938px;">5</td><td style="height: 46.5938px;">0</td><td style="height: 46.5938px;">2.0</td><td style="height: 46.5938px;">2.0</td><td style="height: 46.5938px;">0</td><td style="height: 46.5938px;">0</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">Student Term Values</td><td style="height: 29.7969px;">20</td><td style="height: 29.7969px;">15</td><td style="height: 29.7969px;">15</td><td style="height: 29.7969px;">(4.0x5) + (0x5) +(3.0x5) +(2.0x5) = 45

**45/15 = 3.0**

</td><td style="height: 29.7969px;">(5.0x5) + (0x5) +(3.0x5) +(2.0x5) = 50

**50/15 = 3.33**

</td><td style="height: 29.7969px;">(4.0x5) + (2.0x5) +(3.0x5) +(0x5) = 45

**45/15 = 3.0**

</td><td style="height: 29.7969px;">(5.0x5) + (3.0x5) +(3.0x5) +(0x5) = 55

**55/15 = 3.67**

</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">Student Term Fields</td><td style="height: 46.5938px;">units earned</td><td style="height: 46.5938px;">-</td><td style="height: 46.5938px;">-</td><td style="height: 46.5938px;">GPA</td><td style="height: 46.5938px;">WGPA</td><td style="height: 46.5938px;">AGPA</td><td style="height: 46.5938px;">AWGPA</td></tr></tbody></table>

# 7. Activate Next Student Plan - TBD

The **student plan table** shows the status of the various plans the student has been assigned over time, it is like a log file for the student plans.

- Multiple student plan records may be associated to a student record
- Only one plan may be active at any point in time. **Program\_status =** active.
- There may be other student plan records associated with the student, but their status may not be active.
- The **program start term** field contains information on the school term, not the student term. This is an important value and so the name is stored in the student plan term reocrd field called program start term.

#####   


### Only one student plan record may be active at a time

<p class="callout info">Develop a combination of UI and programming to ensure that only one student plan is active at ay point in time - <span style="color: #e03e2d;">(I have no idea how to do this)</span></p>

#####   


### Find Program start term from start date

When the user assigns the student a plan, they may enter the start date of the plan. For new students is will be important to enter the start date of the plan, as they may be starting in middle of a term. It is important to know if they had less time to complete courses due to a mid-term start date.

<p class="callout info">Based on the start\_date of the student plan, PEMS identifies the starting school term and creates the relationship between school term and the student's plans.</p>

#####   


### Entering State date from Program Start Term

Once a new student has become recurring student, it is easier to enter the **program start term**, rather than the start date. The start date of the student plan should be the corresponding start date ot the **Program start term.**

*However, if the user selects a **Program start term** after a student plan start date has been entered, this function will over-write the start date. We do not want to overwrite a start date as that may contain userful information.*

<p class="callout info">If the **Program start term** is input by the user, then enter the start date from the **Program start term's** start date, but only if the start date field is empty.</p>

### Determining the school term when a student plan is complete

Student Plans are used to create enrollments, but eventually each student will complete their plan and need to be assigned another plan. In the course of 13 years of school, the student will likely complete 6 to 8 plans.

- The student plan is associated to only one school plan in the prgrams of study table. The school plan includes the *total number of terms* required to complete the plan.
- The student's plan record contains the **program start term**.
- To find the last term of the student plan, add the total number of terms to the sequence

<p class="callout info">student plan record: *program start term:* related sequence + related school plan: *total number of terms* = sequence of term the school plan will be completed</p>

### Completing the Active Student Plan

We can find the school term when a student plan should completed (see above). When the last school term in the plan has passed, PEMS can mark the student plan record complete. The student plan record is marked complete based only on the calendar. A student's marks for classes during the plan are not relevent.

So when the current date is passed any student's plan's final term current date, then the student plan record will be marked complete.

<p class="callout info">When the current date is &gt;/= end date of the student plans' final term, then change the status of the student plan to 'completed.</p>

### Activating the next student plan

If there is another student plan record with status = future, then we can automatically activate the next plan record, after we set the satus of the student plan record above to completed. Each student plan is associated to a **program start term**, which has a sequence. The next student plan will have a **program start term** sequence greater than the last student plan record **program start term's** sequence. *The last student plan record will be the record we most recently marked complete in the step above.*

However, there could be multiple student plans with **program start term** sequence greater than the current school term. So we need to find the *lowest* sequence number that is also greater than the last **program start term's** sequence.

<p class="callout info">FInd the student plan record where the **program start term's** squence is greater than the last student plan's **program start term's** sequence, but also the lowest value in all the avaiable student plan records. Set this student plan status to active.</p>

### No future plan exists

If there are no student plan records with status = future, then the student can not automically be assigned the next plan. For students who have had their plan marked completed, but they have no future plan, we will create a filtered report for the user. The user will then assign a plan for these students. Ideally, the user will complete this task before the end of term.

<p class="callout info">Create a filtered list of students who do not have any active student plans for the user to review and address</p>

<p class="callout info">All new student plan records will default to status = future. </p>

### When a Student Plan is activated

When a new student plan is activated, status was changed from future to active. This change in status will trigger the next process, creating the set of enrollment records.

### When a Student plan is Changed before its completion

A student may need to change the plan they are working towards. This may occur after some enrollment records were already created, and some records may be completed while others are not completed.

For a change of plan, the active plan program value field is set to 'suspended' by the user. A new plan will be created as a future plan, then the field status changed from future to active. This set of actions will trigger the creating of new enrollment records.

# 8. Groups Function

<table border="1" id="bkmrk-calendar-functions-n" style="border-collapse: collapse; width: 99.7531%; height: 470.203px;"><colgroup><col style="width: 17.72%;"></col><col style="width: 12.2677%;"></col><col style="width: 70.0124%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Groups](https://bsa.lynops.com/books/personal-education-management-system/page/groups-table "Groups")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 1.0 Create Group records for new Homeroom record

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*When a new homeroom is added, the group records in PEMS are created.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Trigger*</td><td style="height: 29.7969px;">*Runs only one time, when the new homeroom record is added.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*homeroom status field is active.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*This function runs after a new homeroom record is created*</td></tr><tr style="height: 57.75px;"><td style="height: 57.75px;"> </td><td style="height: 57.75px;">Step 1</td><td style="height: 57.75px;">Find Set of all Active Curriculum records.

</td></tr><tr style="height: 57.75px;"><td style="height: 57.75px;">  
</td><td style="height: 57.75px;">Step 2</td><td style="height: 57.75px;">Create a Group record for each Curriculum record.

</td></tr><tr style="height: 57.75px;"><td style="height: 57.75px;">  
</td><td style="height: 57.75px;">Step 3</td><td style="height: 57.75px;">Set Homeroom = to the new homeroom record created.

</td></tr><tr style="height: 38.375px;"><td style="height: 38.375px;">END</td><td style="height: 38.375px;">  
</td><td style="height: 38.375px;"> </td></tr></tbody></table>

<table border="1" id="bkmrk-groups-not-started-2" style="border-collapse: collapse; width: 99.7531%; height: 480.672px;"><colgroup><col style="width: 17.72%;"></col><col style="width: 12.2677%;"></col><col style="width: 70.0124%;"></col></colgroup><tbody><tr style="height: 99.4844px;"><td style="height: 99.4844px;">[Groups](https://bsa.lynops.com/books/personal-education-management-system/page/groups-table "Groups")</td><td style="height: 99.4844px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 99.4844px;">#### 2.0 Create Group records when a curriculum record has been activated

*note: do not allow new curriculum records to be created with status = active, default must be draft.*

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*When a new curriculum record has been added, group records need to be made for all active homerooms.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Trigger*</td><td style="height: 46.5938px;">*Runs whenever the status field in the curriculum record has been changed to 'active'*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*curriculum status field has been changed from any value to active.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*This function runs after the curriculum status has been changed.*</td></tr><tr style="height: 57.75px;"><td style="height: 57.75px;"> </td><td style="height: 57.75px;">Step 1</td><td style="height: 57.75px;">Find Set of all Active Homeroom records

</td></tr><tr style="height: 57.75px;"><td style="height: 57.75px;">  
</td><td style="height: 57.75px;">Step 2</td><td style="height: 57.75px;">Create a Group record for each homeroom record

</td></tr><tr style="height: 57.75px;"><td style="height: 57.75px;">  
</td><td style="height: 57.75px;">Step 3</td><td style="height: 57.75px;">Set Curriculum in the group record = to the newly activated curriculum record.

</td></tr><tr style="height: 38.375px;"><td style="height: 38.375px;">END</td><td style="height: 38.375px;">  
</td><td style="height: 38.375px;"> </td></tr></tbody></table>

<table border="1" id="bkmrk-groups-not-started-3" style="border-collapse: collapse; width: 99.7531%; height: 461.672px;"><colgroup><col style="width: 17.72%;"></col><col style="width: 12.2677%;"></col><col style="width: 70.0124%;"></col></colgroup><tbody><tr style="height: 80.4844px;"><td style="height: 80.4844px;">[Groups](https://bsa.lynops.com/books/personal-education-management-system/page/groups-table "Groups")</td><td style="height: 80.4844px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 80.4844px;">#### 3.0 Deactivate Group when home room is deactivated or Curriculum is deactivated

*note: add active/inactive status field to Group and Homeroom*

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*\#When a curriculum is not longer uses or a homeroom no longer operates, deactivate the associated group.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Trigger*</td><td style="height: 46.5938px;">*Runs whenever the the status field in the curriculum or homeroom record has been changed to 'inactive'*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*Curriculum status field has been changed from any value to inactive.*

*OR*

*Homeroom status field has been changed to inactive*

</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*This function runs after the curriculum or homeroom status has been changed.*</td></tr><tr style="height: 57.75px;"><td style="height: 57.75px;"> </td><td style="height: 57.75px;">Step 1</td><td style="height: 57.75px;">Find related Group record

</td></tr><tr style="height: 57.75px;"><td style="height: 57.75px;">  
</td><td style="height: 57.75px;">Step 2</td><td style="height: 57.75px;">Set Group record status to inactive.

</td></tr><tr style="height: 38.375px;"><td style="height: 38.375px;">END</td><td style="height: 38.375px;">  
</td><td style="height: 38.375px;"> </td></tr></tbody></table>

# 0.Add New Fields - Completed

##### System Level Fields - Configuration Page

*<span style="color: #e03e2d;">This table page should replace the "parameters" page and table with system level field values below:</span>*

<table border="1" id="bkmrk-field-name-descripti" style="border-collapse: collapse; width: 100%; height: 502.062px;"><tbody><tr style="height: 57.75px;"><td style="width: 33.3745%; height: 57.75px;">**Field Name**</td><td style="width: 33.3745%; height: 57.75px;">**Description**</td><td style="width: 33.3745%; height: 57.75px;">**Reference**</td></tr><tr style="height: 63.3906px;"><td style="width: 33.3745%; height: 63.3906px;">Terms Per Year</td><td style="width: 33.3745%; height: 63.3906px;">This is already column in the parameters table, convert to a field on the configuration page </td><td style="width: 33.3745%; height: 63.3906px;">[https://cs.studianova.org/admin/parameters](https://bsa.lynops.com/parameters)</td></tr><tr style="height: 63.3906px;"><td style="width: 33.3745%; height: 63.3906px;">Days Per Year</td><td style="width: 33.3745%; height: 63.3906px;">This is already column in the parameters table, convert to a field on the configuration page </td><td style="width: 33.3745%; height: 63.3906px;">[https://cs.studianova.org/admin/parameters](https://bsa.lynops.com/parameters)</td></tr><tr style="height: 63.3906px;"><td style="width: 33.3745%; height: 63.3906px;">School Beginning Date</td><td style="width: 33.3745%; height: 63.3906px;">This is already column in the parameters table, convert to a field on the configuration page </td><td style="width: 33.3745%; height: 63.3906px;">[https://cs.studianova.org/admin/parameters](https://bsa.lynops.com/parameters)</td></tr><tr style="height: 63.3906px;"><td style="width: 33.3745%; height: 63.3906px;">Back Years</td><td style="width: 33.3745%; height: 63.3906px;">This is already column in the parameters table, convert to a field on the configuration page </td><td style="width: 33.3745%; height: 63.3906px;">[https://cs.studianova.org/admin/parameters](https://bsa.lynops.com/parameters)</td></tr><tr><td style="width: 33.3745%;">Attrition Rate</td><td style="width: 33.3745%; height: 63.3906px;">This is already column in the parameters table, convert to a field on the configuration page </td><td style="width: 33.3745%; height: 63.3906px;">[https://cs.studianova.org/admin/parameters](https://bsa.lynops.com/parameters)</td></tr><tr><td style="width: 33.3745%;">Student Teacher Ratio</td><td style="width: 33.3745%; height: 63.3906px;">This is already column in the parameters table, convert to a field on the configuration page </td><td style="width: 33.3745%; height: 63.3906px;">[https://cs.studianova.org/admin/parameters](https://bsa.lynops.com/parameters)</td></tr><tr style="height: 67.7812px;"><td style="width: 33.3745%; height: 67.7812px;">Promotion Date </td><td style="width: 33.3745%; height: 67.7812px;">Date field when the students are promoted by grade level</td><td style="width: 33.3745%; height: 67.7812px;">[1.Calendar Functions](https://bsa.lynops.com/books/personal-education-management-system/page/1-calendar-functions-ready)</td></tr><tr style="height: 63.375px;"><td style="width: 33.3745%; height: 63.375px;">Lowest Grade Level </td><td style="width: 33.3745%; height: 63.375px;">Menu select from K-12 list</td><td style="width: 33.3745%; height: 63.375px;">  
</td></tr><tr style="height: 29.7969px;"><td style="width: 33.3745%; height: 29.7969px;">Highest Grade Level</td><td style="width: 33.3745%; height: 29.7969px;">Menu select from K-12 list</td><td style="width: 33.3745%; height: 29.7969px;">  
</td></tr><tr style="height: 29.7969px;"><td style="width: 33.3745%; height: 29.7969px;">  
</td><td style="width: 33.3745%; height: 29.7969px;">  
</td><td style="width: 33.3745%; height: 29.7969px;">  
</td></tr></tbody></table>

##### Table Field Updates

<table border="1" id="bkmrk-field-name-descripti-0" style="border-collapse: collapse; width: 100%; height: 835.739px;"><tbody><tr style="height: 29.7017px;"><td style="width: 33.3745%; height: 29.7017px;">**Field Name**</td><td style="width: 33.3745%; height: 29.7017px;">**Description**</td><td style="width: 33.3745%; height: 29.7017px;">**Reference**</td></tr><tr style="height: 80.0994px;"><td style="width: 33.3745%; height: 80.0994px;">Term Starts</td><td style="width: 33.3745%; height: 80.0994px;">**Term Label Table** - menu select

menu options: "i*n academic start year*" and "in academic end year"

</td><td style="width: 33.3745%; height: 80.0994px;">[Default Term Years](https://bsa.lynops.com/books/personal-education-management-system/page/4-create-set-of-school-terms-ready)  
</td></tr><tr style="height: 80.0994px;"><td style="width: 33.3745%; height: 80.0994px;">Term Ends</td><td style="width: 33.3745%; height: 80.0994px;">**Term Label Table -** menu select

menu options: "in academic start year" and "*in academic end year*"

</td><td style="width: 33.3745%; height: 80.0994px;">[Default Term Years](https://bsa.lynops.com/books/personal-education-management-system/page/4-create-set-of-school-terms-ready)</td></tr><tr style="height: 57.7699px;"><td style="width: 33.3745%; height: 57.7699px;">Assessment Window</td><td style="width: 33.3745%; height: 57.7699px;">Term Label table - integer value </td><td style="width: 33.3745%; height: 57.7699px;">[Assessment Module](https://bsa.lynops.com/books/personal-education-management-system/page/assessment-module)</td></tr><tr style="height: 66.3636px;"><td style="width: 33.3745%; height: 66.3636px;">Type - change menu options</td><td style="width: 33.3745%; height: 66.3636px;">Assessment Code table - change menu options to "Level Equivalent", "Percentile Rank", "Competency" </td><td style="width: 33.3745%; height: 66.3636px;">[Assessment Module](https://bsa.lynops.com/books/personal-education-management-system/page/assessment-module)</td></tr><tr style="height: 57.7699px;"><td style="width: 33.3745%; height: 57.7699px;">Subject field - make mandatory</td><td style="width: 33.3745%; height: 57.7699px;">Assessment Code table</td><td style="width: 33.3745%; height: 57.7699px;">[Assessment Module](https://bsa.lynops.com/books/personal-education-management-system/page/assessment-module)</td></tr><tr style="height: 57.7699px;"><td style="width: 33.3745%; height: 57.7699px;">Percentile Rank</td><td style="width: 33.3745%; height: 57.7699px;">Marks Matrix table - add a decimal field, two places</td><td style="width: 33.3745%; height: 57.7699px;">[Assessment Module](https://bsa.lynops.com/books/personal-education-management-system/page/assessment-module)</td></tr><tr style="height: 57.7699px;"><td style="width: 33.3745%; height: 57.7699px;">Relationship - relate assessment results table to student term table</td><td style="width: 33.3745%; height: 57.7699px;">multiple assessment results per student term</td><td style="width: 33.3745%; height: 57.7699px;">[Assessment Module](https://bsa.lynops.com/books/personal-education-management-system/page/assessment-module)</td></tr><tr style="height: 57.7699px;"><td style="width: 33.3745%; height: 57.7699px;">Percentile Rank</td><td style="width: 33.3745%; height: 57.7699px;">Assessment Result table - integer value</td><td style="width: 33.3745%; height: 57.7699px;">[Assessment Module](https://bsa.lynops.com/books/personal-education-management-system/page/assessment-module)</td></tr><tr style="height: 57.7699px;"><td style="width: 33.3745%; height: 57.7699px;">Moodle Learning Plan</td><td style="width: 33.3745%; height: 57.7699px;">program of study table - text field</td><td style="width: 33.3745%; height: 57.7699px;">[Assessment Module](https://bsa.lynops.com/books/personal-education-management-system/page/assessment-module)</td></tr><tr style="height: 57.7699px;"><td style="width: 33.3745%; height: 57.7699px;">Learning Plan Status</td><td style="width: 33.3745%; height: 57.7699px;">program of study table - text field</td><td style="width: 33.3745%; height: 57.7699px;">[Assessment Module](https://bsa.lynops.com/books/personal-education-management-system/page/assessment-module)</td></tr><tr style="height: 57.7699px;"><td style="width: 33.3745%; height: 57.7699px;">Plan GPA</td><td style="width: 33.3745%; height: 57.7699px;">Student Plan Table - decimal value, two places</td><td style="width: 33.3745%; height: 57.7699px;">[Student Plan Table](https://bsa.lynops.com/books/personal-education-management-system/page/student-plan-table)</td></tr><tr style="height: 57.7699px;"><td style="width: 33.3745%; height: 57.7699px;">Expiry Date</td><td style="width: 33.3745%; height: 57.7699px;">authorizations table - date field</td><td style="width: 33.3745%; height: 57.7699px;">[Authorizations](https://bsa.lynops.com/books/personal-education-management-system/page/authorizations)</td></tr><tr style="height: 29.7727px;"><td style="width: 33.3745%; height: 29.7727px;">  
</td><td style="width: 33.3745%; height: 29.7727px;">  
</td><td style="width: 33.3745%; height: 29.7727px;">  
</td></tr><tr style="height: 29.7727px;"><td style="width: 33.3745%; height: 29.7727px;">  
</td><td style="width: 33.3745%; height: 29.7727px;">  
</td><td style="width: 33.3745%; height: 29.7727px;">  
</td></tr></tbody></table>

##### Relationship and Table Changes

<table border="1" id="bkmrk-tables-description-r" style="border-collapse: collapse; width: 100%; height: 304.938px;"><tbody><tr style="height: 29.7969px;"><td style="width: 33.3745%; height: 29.7969px;">**Tables**</td><td style="width: 33.3745%; height: 29.7969px;">**Description**</td><td style="width: 33.3745%; height: 29.7969px;">**Reference**</td></tr><tr style="height: 57.7812px;"><td style="width: 33.3745%; height: 57.7812px;">Relationship - relate assessment results table to student term table</td><td style="width: 33.3745%; height: 57.7812px;">multiple assessment results per student term</td><td style="width: 33.3745%; height: 57.7812px;">[Assessment Module](https://bsa.lynops.com/books/personal-education-management-system/page/assessment-module)</td></tr><tr style="height: 57.7812px;"><td style="width: 33.3745%; height: 57.7812px;">Delete CredAuthorizations table</td><td style="width: 33.3745%; height: 57.7812px;">replace with multi-select field in authorizations table (see below)</td><td style="width: 33.3745%; height: 57.7812px;">[Authorizations](https://bsa.lynops.com/books/personal-education-management-system/page/authorizations)</td></tr><tr style="height: 66.3906px;"><td style="width: 33.3745%; height: 66.3906px;">For Authorizations, add a multi-select pick list that allows users to select from the credential table.</td><td style="width: 33.3745%; height: 66.3906px;">Authorizations</td><td style="width: 33.3745%; height: 66.3906px;">[Authorizations](https://bsa.lynops.com/books/personal-education-management-system/page/authorizations)</td></tr><tr style="height: 33.5938px;"><td style="width: 33.3745%; height: 33.5938px;">templates are child records to subject requirements</td><td style="width: 33.3745%; height: 33.5938px;">many template to one subject requirement record</td><td style="width: 33.3745%; height: 33.5938px;">[3.Programs of Study and Subject Requirements](https://bsa.lynops.com/books/personal-education-management-system/page/4-programs-of-study-and-subject-requirements)</td></tr><tr style="height: 29.7969px;"><td style="width: 33.3745%; height: 29.7969px;">  
</td><td style="width: 33.3745%; height: 29.7969px;">  
</td><td style="width: 33.3745%; height: 29.7969px;">  
</td></tr><tr style="height: 29.7969px;"><td style="width: 33.3745%; height: 29.7969px;">  
</td><td style="width: 33.3745%; height: 29.7969px;">  
</td><td style="width: 33.3745%; height: 29.7969px;">  
</td></tr></tbody></table>