From c4f00b6716e0c0d23db1212fbddb0964d55501c4 Mon Sep 17 00:00:00 2001 From: Sandra Kuipers Date: Wed, 8 May 2024 15:00:57 +0800 Subject: [PATCH] Attendance: fix the attendance counts in Attendance Summary by Date one more time --- modules/Attendance/report_summary_byDate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Attendance/report_summary_byDate.php b/modules/Attendance/report_summary_byDate.php index b365ddeeba..340174bd79 100644 --- a/modules/Attendance/report_summary_byDate.php +++ b/modules/Attendance/report_summary_byDate.php @@ -197,7 +197,7 @@ } else if ($group == 'formGroup') { $data['gibbonFormGroupID'] = $gibbonFormGroupID; - $sql = "SELECT gibbonPerson.gibbonPersonID, gibbonFormGroup.nameShort AS formGroup, surname, preferredName, gibbonAttendanceLogPerson.*, gibbonAttendanceCode.nameShort as code FROM gibbonAttendanceLogPerson JOIN gibbonAttendanceCode ON (gibbonAttendanceLogPerson.type=gibbonAttendanceCode.name) JOIN gibbonPerson ON (gibbonAttendanceLogPerson.gibbonPersonID=gibbonPerson.gibbonPersonID) JOIN gibbonStudentEnrolment ON (gibbonStudentEnrolment.gibbonPersonID=gibbonPerson.gibbonPersonID) JOIN gibbonFormGroup ON (gibbonStudentEnrolment.gibbonFormGroupID=gibbonFormGroup.gibbonFormGroupID) WHERE date>=:dateStart AND date<=:dateEnd AND gibbonStudentEnrolment.gibbonSchoolYearID=:gibbonSchoolYearID AND gibbonStudentEnrolment.gibbonFormGroupID=:gibbonFormGroupID AND (gibbonAttendanceLogPerson.context='Form Group' OR gibbonAttendanceLogPerson.context='Future' OR gibbonAttendanceLogPerson.context='Person' OR gibbonAttendanceLogPerson.context='Self Registration')"; + $sql = "SELECT gibbonPerson.gibbonPersonID, gibbonFormGroup.nameShort AS formGroup, surname, preferredName, gibbonAttendanceLogPerson.*, gibbonAttendanceCode.nameShort as code FROM gibbonAttendanceLogPerson JOIN gibbonAttendanceCode ON (gibbonAttendanceLogPerson.type=gibbonAttendanceCode.name) JOIN gibbonPerson ON (gibbonAttendanceLogPerson.gibbonPersonID=gibbonPerson.gibbonPersonID) JOIN gibbonStudentEnrolment ON (gibbonStudentEnrolment.gibbonPersonID=gibbonPerson.gibbonPersonID) JOIN gibbonFormGroup ON (gibbonStudentEnrolment.gibbonFormGroupID=gibbonFormGroup.gibbonFormGroupID) WHERE date>=:dateStart AND date<=:dateEnd AND gibbonStudentEnrolment.gibbonSchoolYearID=:gibbonSchoolYearID AND gibbonStudentEnrolment.gibbonFormGroupID=:gibbonFormGroupID"; } if ( !empty($gibbonAttendanceCodeID) ) {