Attendance Summary by Date - absent days count

The Attendance Summary by Date produces a different number of absent days from the Attendance page of a student.

We have a couple of students who come late to school and are therefore registered as Absent Unexcused for their Homeroom time in the morning. The first class then takes attendance, and their attendance is modified to Present - Late, and later classes as Present. The color codes on the student’s Attendance page are correct, either Green or Orange, the school termly reports are also working fine, but when our admins want to just have a quick look at the Attendance Summary by Date report, the data is different. It shows a lot more absent days.

I have attached 2 images that show the data for the same student. What could we do to have the correct data?



Thanks for letting me know, I can look into this. Can you share a screenshot of the top settings form for the attendance summary, as well as which settings you have turned on in School Admin > Attendance Settings, which will help me reproduce any issues.

Hi @thajni I believe I’ve fixed the issue. In looking closer at the script, it looks like the Group By: Form Group option was only counting form group attendance, which didn’t include contexts such as Person or Future attendance. I also adjusted the date counter to exclude school closures. In making these changes, when testing, I can see that the numbers in both screens now match. The fix is in v27, but it’s just one file, so you could apply the fix to your system by updating the modules/Attendance/report_summary_byDate.php file.

Hi @sandra ! Thank you for looking into this. I tried to use the fix, but the data is still wrong on the summary page. This particular student with whom I am testing almost always misses the form registration in the morning, so he gets an Absent Unexcused code, and then he is marked as Present or Present late in the first class.


So you can see on his attendance page, he is marked as Present overall, but in the summary his absent unexcused days are not counted correctly.

This is our settings:

This is the Summary by Date query:

This is the full page of Attendance for the first student in the summary list who causes the problems, not 63 absent days overall but like half.


Ah, I see you’re using the First Class as School Attendance setting, which adds some more complexities, and wasn’t part of my initial fix. I’ll do some more testing to see if I can get that setting working better with this report.

Thanks for the new screenshots, I’ve made one more fix, which should account for this setting without breaking the previous setting’s calculations. Updated file can be found here:

@sandra thank you so much for this fix. It displays now the same number of absent days in the summary as on the Attendance page for a student.

1 Like