Skip to main content

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.

The key trigger for the creation of enrollment records is the change of a student plan record from future to active.  


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)

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 curriculum, 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 found 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 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.

Key Trigger: Student plan is changed from Active to Suspended

Find all incomplete enrollment records associated to the suspended student plan and delete them


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.

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.

For recurring students with new plans:

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

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

Exclude any template records from the enrollment algorithm that have been matched by the class field to any completed enrollment record

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.

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).

Proceed to create enrollment records as described in the enrollment algorithm, but exclude the records that have already been matched to active/completed enrollments.