For Developers
The Attendance Data Model
When storing attendance data storage can become a significant consideration. The volume of attendance records can easily exceed 100 times the number of class enrollments. For that reason, we provide (and recommend storing) only negative attendance records and those records with flags. Put another way, if an attendance record is "normal" (i.e. the student attended class with no notable events) we do not store that record.
We store attendance information in two key scenarios:
- Negative Attendance Records: These are instances when a person is marked absent.
- Attendance Records with Flags: If a record has an Attendance Flag, for instance, a person may have a valid reason for missing a class or a unique circumstance that needs to be noted. In these cases, a flag is added to the record. Edlink stores these flagged attendance records.
If you do require positive attendance you can follow the following procedure to convert between the two.
Converting Between Negative And Positive Attendance
If you need to convert from negative to positive attendance. You can use the following procedure.
Daily Attendance
- List the meetings for the days you are interested in tracking
- Pull all negative attendance records for these meetings
- Get all people that you want to track attendance for
- Get enrollments for the person and get the earliest start date of all the enrollments
- Loop through the meeting records and create a positive attendance record for each enrollment where:
- An existing attendance record doesn't already exist.
- The meeting day is on or after the person's earliest enrollment start date
Class Attendance
- Get the meetings for the days and classes you are interested in tracking
- Pull all negative attendance records for the meeting
- Get the class record and enrollments for the meeting
- Loop through the meeting records and create a positive attendance record for each enrollment where:
- An existing attendance record doesn't already exist.
- The meeting day is on or after the person's enrollment date