SOF_BookedPlaces_TDTM
Study Offering trigger handler/TDTM to prevent exceeding capacity
Table of Contents
Custom Permission | REDU - Student, REDU - Guest |
Event | AfterUpdate |
Object | Study Offering |
Related RIO Education Settings | None |
Description
Introduced in v3.14, this class serves to prevent students and guest users from “over-enrolling” to a Study Offering, i.e. going over the Study Offering's capacity.
If a user:
-
has REDU - Student or REDU - Guest permission, and,
-
is increasing the Study Offering's ‘Booked Place’ above the ‘Capacity’,
- rio_ed__Study_Offering__r.rio_ed__Booked_Places__c > rio_ed__Study_Offering__r.rio_ed__Capacity__c
then, the class will prevent it and notify that there are no more places available.
Note:
It only checks if students and guest users are enrolling over the Study Offering's capacity.
It does not prevent admin user from enrolling more students to the Study Offering than it's maximum capacity.
Use case
Before opening a Study Offering for enrollment, the capacity needs to be defined first.
For example, there are only enough faculty/resources to cater for 50 students.
This class will help to prevent the capacity from being exceeded, such that only a maximum of 50 students can enroll.
See also: How Continuing Education works