PREN_CompletionEngine_TDTM
Completion engine trigger handler/TDTM for Course Connection, Course Offering, Grade Setting, PE Group, PE Pathway
Course Connection
Custom Permission | REDU - Admin, REDU - Faculty |
Event | BeforeInsert, BeforeUpdate, AfterInsert, AfterUpdate |
Object | Course Connection |
Related RIO Education Settings | Auto Clone CC For Fail Auto Complete on Release Grades |
Description
Whenever a Student Course Connection is inserted or if the Grade Settings Type, Grade, Grade Value, Grade Result, Release Grades, Credits Earned or Credits Attempted fields of an existing Course Connection are updated, this class will determine if it is suitable to be graded.
This means it must be related to a Program, Program Enrollment, and a Course Offering (if the Grade Result is RPL, Credit Transfer or Waiver, then it does not need to be related to a Course Offering).
If the above conditions are met but the Release Grades field is not checked, then the Grade Setting Type field is set using the value of the Grade Setting Type field on the related Course.
If the conditions are met and the Release Grades field is checked, then this class will do the grading. First, the Credits Attempted is determined using the Credits Offered.
If the Course Connection has been updated, then this class will find all related Session Connections for Sessions with Mandatory Attendance set to true and check if the student met the attendance requirements for this Course Connection.
Next, the Grade Setting Type is determined from the Grade Setting Type on the related Course and the Grade Value, Grade Result and Grade Points are determined using the Grade Setting Type. Finally, the Credits Earned field is set depending on the Grade Result. If the Grade Result is Pass, RPL, Credit Transfer or Waiver, the Credits Earned is set to the Credits Attempted. If the Grade Result is Fail or the Ignore Credits Earned field is true, then the Credits Earned is set to 0 (note that the Ignore fields should always be selected if the result is Waiver but this is not actually enforced by the code).
This class also handles cases where students are repeating the Course. If the Course Connection's Repeated Course Connection checkbox is checked or the Attempt Number is greater than 1, then if the Release Grades field is true, then this class will find any other Course Connections for this Enrollment and Target Course and find the best grade out of all of their grades. For any that don't have the best grade, this class will set Ignore Credits Earned and Ignore for GPA Calculation to true and Credits Earned to 0. It will also ensure that these updates do not retrigger the entire completion engine.
The final step is to update the Enrollment Status from Enrolled to Completed. This only happens if the Auto Complete on Release Grades custom setting is enabled.
After the Course Connection has been inserted or updated, if the Credits Attempted field has been set (for insert) or the Grade Points, Credits Earned, Credits Attempted, Courses Passed, Completion Percentage and Group Status have been updated (for update), this class will update the same set of fields on the related PE Group and any parent PE Groups by cascade updating from the PE Group's related Course Connections or child PE Groups. If a Course Connection's PE Group is changed, this update will be performed for both the old and new PE Groups.
If the Course Connection's Enrollment Status is Completed and its Grade Result is Failed, then this class will clone the Course Connection record in readiness for the Course to be repeated. This only happens if the Auto Clone CC For Fail custom setting is enabled. If the Enrollment status and Grade Result fields are reset back from Completed and Failed, then this class will also delete the cloned Course Connection and Course Connection Requirement records that are no longer necessary.
Course Offering
Custom Permission | REDU - Admin, REDU - Faculty, REDU - Student |
Event | AfterUpdate |
Object | Course Offering |
Related RIO Education Settings | None |
Description
Whenever a Course Offering's Primary Faculty field is updated, this class will cascade update its related Course Connection records so that their Owner field is updated to be the related User of the new Primary Faculty.
Grade Setting
Custom Permission | REDU - Admin, REDU - Faculty |
Event | BeforeInsert, BeforeUpdate |
Object | Grade Setting |
Related RIO Education Settings | None |
Description
Whenever a new Grade Settings record is inserted, this class sets the Grade Setting Unique Key field to a unique key identifier that is a combination of the Grade Setting Group and Grade Value fields. This ensures that duplicate Grade Setting records are not created within a Grade Setting Group.
This value is recalculated and the field is reset whenever the Grade Setting Group or Grade Value fields are updated.
As of v3.14, if a Grade Setting has “Ignore Credits Earned” and “Ignore for GPA Calculation” checked (TRUE), and a Course Connection is given a matching grade, then, both of these fields on the Course Connection will be automatically checked (TRUE) as well.
PE Group
Custom Permission | REDU - Admin, REDU - Faculty |
Event | AfterUpdate |
Object | PE Group |
Related RIO Education Settings | None |
Description
Whenever an existing PE Group's Program Enrollment, Grade Points, Credits Attempted, Credits Earned, Courses Passed, or Group Status fields are updated, this class triggers update functionality on the related Enrollment record, causing the cascade update to be re-calculated (see the PREN_CompletionEngine_TDTM section in the Enrollment Trigger Handlers article).
While this update happens, the IS_EXECUTING flag is set to true. The flag is reset to false when the update has completed.
PE Pathway
Custom Permission | REDU - Admin, REDU - Faculty, REDU - Student |
Event | BeforeUpdate |
Object | PE Pathway |
Related RIO Education Settings | None |
Description
Whenever an existing PE Pathway record is updated, this class cascade updates completion fields on the PE Pathway from related Course Connections. The fields updated are:
PE Pathway Field |
Course Connection Field |
---|---|
Enrolled Courses | Count of all Course Connections with enrollment status = Enrolled/Completed/Withdrawal Requested. |
Completed Courses | Count of all Course Connections with enrollment status = Completed and release grades is checked. |
All Courses Completed | True if all Course Connections with enrollment status = Completed and release grades is checked. |
All Courses Passed | True if all Course Connections with grade result = Pass/Credit Transfer/RPL/Waiver. |
Credits Enrolled | Sum of the credits offered from all Course Connections with enrollment status = Enrolled/Withdrawal Requested + Sum of the credits attempted from all Course Connections with enrollment status = Completed. [1] |
Credits Attempted | Sum of the credits attempted from all Course Connections. |
Credits Earned | Sum of the credits earned from all Course Connections. |
Grade Points | Sum of the grade points from all Course Connection with ignore for GPA calculation unchecked. |
GPA | Calculated GPA based on (grade points x credits attempted) / credits attempted. |