# Absence reports ## Purpose **Assessment & Grading → Absence reports**, `/reports/absence-reports`. Six reports cover recorded student absences. They display/export data, not modify attendance. Marks are entered in the lesson journal (`/grade-book`); an associated excuse record determines excused status. ## Report types Every report requires academic year, semester 1/2 and faculty. Other fields depend on the selected tab. | Tab | Additional required fields | Additional filters and result | |---|---|---| | Monthly absences by subject | Degree, format, profession, course 1–6, month | Groups and subjects (multi-select), lesson/absence type. Student rows; lecture, practical, excused lecture/practical per subject; monthly and semester total, excused and unexcused counts. | | Monthly absence reference | Degree, format, profession, course | Lesson/absence type, student status, minimum/maximum count. Each semester month shows lectures, practicals and total; semester total. | | Monthly absence list | Degree, format, profession, course | Student status and minimum/maximum count. Each month and semester show total, excused, unexcused. | | Absence percentage threshold | Degree, format, profession, course | Threshold (0–100%, default 10), subjects, lesson/absence type, student status, unexcused only. Per-subject count and percentage; students qualify if at least one subject meets the threshold. | | Semester absences by group | Degree, format | Student status; group by group (default), course or program (plan ID). Student counts, counts and percentages of all/excused/unexcused marks. | | Student absence details | Student, from/to dates | Optional degree, format, profession, course, groups, month, subjects, lesson/absence type. Each row shows date, lesson time, subject, lesson type, lecturer, excuse status and mark timestamp. | Absence type: all, excused, unexcused. Lesson type: all, lecture, practical. Student status: all, active, inactive. Minimum/maximum counts are nonnegative integers with maximum ≥ minimum. The absence-type field on the monthly-by-subject tab does not restrict its main breakdown in the current calculation; it is designed to show total and excused counts together. Use monthly reference or details for the corresponding filtered subset. ## Generate and period 1. Select report type, academic year and semester. 2. Select degree, faculty, format and profession within allowed scope, course and required fields. Changing a parent clears dependent fields. Month is selected from the calendar list. 3. Apply. Results are paginated, default 50 rows. The headline total is counted marks, not number of students. Numeric table totals sum across filtered rows; percentages are not summed. 4. Change tabs or filters and rerun; Reset restores defaults. Semester dates come from the academic timetable period: profession/course-specific rows are used first, otherwise the default period. The earliest start/latest end define boundaries. Detail dates restrict the period, not expand it. No applicable period means no attendance data. For a monthly report, the UI can show a warning and permitted link to create/configure the academic period with a Reload button. Verify and save the period before rerunning; selecting a month alone does not configure it. ## Counting absences Data sources are actual journal entries with factor `absent` and a nonnull value, lesson day, workload allocation, student affiliation and excuse. Marks from the effective dismissal date onward are excluded. Excused status depends on a linked nondeleted excuse, not a typed label. Student selection uses the latest educational status for the requested academic year. Lesson kind uses the workload's single teaching type where available: lecture is recognized from its localized name, other nonempty kinds are practical; unknown kind is not in either separate lecture/practical count. Counts are absence marks, not academic hours. Percentage report uses: `percentage = counted absences / conducted lessons × 100`. The denominator is distinct journal days for the student and subject through group assignment and period, not planned hours; future dates are excluded. Results round to two decimals, zero denominator yields 0. A lesson-type filter restricts marks but the current denominator remains conducted lessons of the subject. Semester grouping divides aggregate marks by aggregate student-lesson counts, not by student count or by an average of group percentages. **Example.** A subject has 40 conducted lessons and 5 absence marks, 2 excused. All = 12.50%; unexcused = 3/40 = 7.50%. At 10%, the student qualifies for all absences but not unexcused-only on this subject. Monthly reference/list highlight subject thresholds at 10%. Verify equality and zero: the percentage report includes equality when at least one mark exists. ## Details and export In the first three tabs select an enabled numeric cell to open student details. Cell context supplies student, month, subject, lesson type or absence status. The modal displays matching marks with pagination. Not every cell or report supports drill-down. The standalone details tab accepts custom from/to dates (end no earlier than start). After generation, Excel (XLSX), PDF and Print require export permission. The server rebuilds **all matching rows**, not just the current page. Print uses PDF. Reporting does not correct journal records. ## Permissions and scopes Routes: `absence-report.index` (types), `absence-report.filters` (lookups), `absence-report.data` (generation), `absence-report.details` (details), `absence-report.export` (Excel/PDF/print; group `AbsenceReportExport`). Faculty, Profession, Department and Subject scopes are supported. Subject-only roles without broader scope can access only monthly absences by subject and student details; a lecturer with a linked employee record is restricted to their subject assignments. No faculty choices may indicate no permitted scope. Academic-period setup links require separate AcademicPeriodCreateAction or AcademicPeriodOpenAction plus AcademicPeriodUpsertAction. See [role permissions](/en/docs/role-permissions). - No results: verify period, group, educational status, scope and absence factor in the journal. - Zero percentage despite marks: check conducted journal days, group assignment and period. - Excused counted as unexcused: check the saved excuse on the mark. - Missing tab/export: check scope type and report/export permissions. ## Implementation sources - [index.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/AssessmentAndGrading/AbsenceReports/index.tsx) - [ReportTable.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/AssessmentAndGrading/AbsenceReports/ReportTable.tsx) - [service.ts](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/AssessmentAndGrading/AbsenceReports/service.ts) - [selection.ts](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/AssessmentAndGrading/AbsenceReports/selection.ts) - [timetableSetupLink.ts](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/AssessmentAndGrading/AbsenceReports/timetableSetupLink.ts) - [api.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/AbsenceReport/routes/api.php) - [ReportRequest.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/AbsenceReport/Http/Requests/ReportRequest.php) - [AbsenceReportController.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/AbsenceReport/Http/Controllers/AbsenceReportController.php) - [ReportRegistry.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/AbsenceReport/Services/ReportRegistry.php) - [ReportDictionaries.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/AbsenceReport/Services/ReportDictionaries.php) - [ReportBuilder.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/AbsenceReport/Services/ReportBuilder.php) - [ReportExportService.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/AbsenceReport/Services/ReportExportService.php) - [AbsenceRepository.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/AbsenceReport/Repositories/AbsenceRepository.php) - [ModulesSeeder.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/database/seeders/ModulesSeeder.php)