Create Set of Enrollment Records
Considerations in Creating a Set of Enrollment Records
The student plan links the student and the slected program plan. The program plan has a set of child records that specify which classes the student should take in sequentional 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.
The key trigger for the creation of enrollment records is the change of a student plan record from future to active.
Template Record Information
- 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)
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).
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.
For each template that matched the conditions above, create an enrollment record, and associate that enrollment record with the student term.
Set enrollment class, enrollment at_grade, enrollment term label, enrollment curriclum, enrollment curriculum option, enrollment set, enrollment subject to the values in the corresponding template record.
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 fournd for multiple templates.
Exit the matching when every single template record has been considered.
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 enrollment created. In this way we do not create enrollments for student terms where the student was not enrolled.
Change of 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.
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.