TC_LinkCourseConnection_TDTM
Program Enrollment and Transfer Credits trigger handler/TDTM to link Course Connection
Program Enrollment
Custom Permission | None |
Event | BeforeDelete, AfterInsert, AfterUpdate |
Object | Program Enrollment |
Related RIO Education Settings | TransferCredit Agreement Active Statuses TransferCredit Approved Statuses TransferCredit Grade Result TransferCredit Ignore GPA TransferCredit Release Grades |
Description
Whenever a new Program Enrollment is inserted, this class will retrieve any Transfer Credit records linked to the related Program Application / Application (EDA), and also link them to the Program Enrollment.
Whenever an existing Program Enrollment is updated to an in-progress Program Status, this class will retrieve any Transfer Credit Records linked to the Program Enrollment with the both related Transfer Course's Status field and its related Agreement's Status field set to an active status.
For each Transfer Credit retrieved, if the Status is also an approved status, this class will create Course Connection for each Course in the Transfer Credit's Approved Course ID (s) field, or update the existing Course Connection if one already exists.
The Course Connection will be linked to the same Contact and Program Enrollment as the Transfer Credit as well as the Transfer Credit itself, its Credits Attempted field will be taken from the Credits field on the related Plan Requirement for that Course and Program Plan, while the End Date, Start Date, Historical Term and PE Group fields will be taken from the Completed Date, Start Date, Term and PE Group fields on the Transfer Credit.
If the Transfer Credit is an outgoing enrollment, meaning it has a related Transfer Agreement and its Type field is Outgoing, then the Course Connection's Outgoing Enrollment field is checked.
Otherwise, the Grade Result, Release Grades and Ignore for GPA Calculation fields are set based on the TransferCredit Grade Result, TransferCredit Release Grades and TransferCredit Ignore GPA custom settings, the Enrollment Status is set to Completed and the Credits Earned field is taken from the Credits field on the Plan Requirement.
If the new or edited Course Connection is Course based (does not have a related PE Group), then the Plan Requirement Course field is set, linking to the relevant Plan Requirement and the PE Group field is set by finding the PE Group related to this Program Enrollment and Plan Requirement.
If the new or edited Course Connection is Group based (does have a related PE Group), then the Credits Attempted field will be taken from the Credits Attempted field on the Transfer Credit and, if the Course Connection's Outgoing Enrollment field is not checked, the Credits Earned field will also be taken from the Credits Earned field on the Transfer Credit.
If the Transfer Credit has a related PE Discipline Requirement Group, then this class will also create a new PE Discipline Requirement and relate it to the Transfer Credit's PE Discipline Requirement Group and its related PE Discipline or update an existing one if it already exists. In either case, it will set the Credits Earned field based on the Transfer Credit's Credits Earned field and check the Complete field.
Whenever an existing Program Enrollment is deleted, this class will clear the Program Enrollment lookup field on any of its related Transfer Credit records, as long as the Status is not an approved status (deleting a Program Enrollment with an approved Transfer Credit is not permitted).
Transfer Credit
Custom Permission | None |
Event | BeforeInsert, BeforeUpdate, BeforeDelete, AfterInsert, AfterUpdate |
Object | Transfer Credit |
Related RIO Education Settings | TransferCredit Agreement Active Statuses TransferCredit Approved Statuses TransferCredit Grade Result TransferCredit Ignore GPA TransferCredit Release Grades |
Description
Whenever a Transfer Credit is inserted or updated, this class will clear the Transfer Date field if the Status field is not an approved value and will also link the Transfer Credit to the correct Program Enrollment if necessary.
If the Transfer Credit's Status has been set to an approved value or its Program Enrollment field has been changed, this class will create Course Connections for each Course in the Transfer Credit's Approved Course ID (s) field, or update the existing Course Connection if one already exists.
The Course Connection will be linked to the same Contact and Program Enrollment as the Transfer Credit as well as the Transfer Credit itself, its Credits Attempted field will be taken from the Credits field on the related Plan Requirement for that Course and Program Plan, while the End Date, Start Date, Historical Term and PE Group fields will be taken from the Completed Date, Start Date, Term and PE Group fields on the Transfer Credit.
If the Transfer Credit is an outgoing enrollment, meaning it has a related Transfer Agreement and its Type field is Outgoing, then the Course Connection's Outgoing Enrollment field is checked. Otherwise, the Grade Result, Release Grades and Ignore for GPA Calculation fields are set based on the TransferCredit Grade Result, TransferCredit Release Grades and TransferCredit Ignore GPA custom settings, the Enrollment Status is set to Completed and the Credits Earned field is taken from the Credits field on the Plan Requirement.
If the new or edited Course Connection is Course based (does not have a related PE Group), then the Plan Requirement Course field is set, linking to the relevant Plan Requirement and the PE Group field is set by finding the PE Group related to this Program Enrollment and Plan Requirement.
If the new or edited Course Connection is Group based (does have a related PE Group), then the Credits Attempted field will be taken from the Credits Attempted field on the Transfer Credit and, if the Course Connection's Outgoing Enrollment field is not checked, the Credits Earned field will also be taken from the Credits Earned field on the Transfer Credit.
If the Transfer Credit has a related PE Discipline Requirement Group, then this class will also create a new PE Discipline Requirement and relate it to the Transfer Credit's PE Discipline Requirement Group and its related PE Discipline or update an existing one if it already exists. In either case, it will set the Credits Earned field based on the Transfer Credit's Credits Earned field and check the Complete field.
If an existing Transfer Credit's Program Enrollment field is cleared, has its Status field is changed from an approved value or is deleted, this class will clear the Program Enrollment lookup field.