Attendance
The class teacher of a section marks every student Present, Absent, or Late for today. Students and parents see the result the moment it lands. Parents get a push notification when their child is marked Absent so they hear about it before the day ends.
At a glance
| Who can do this | Class teachers mark (only for sections they are the class teacher of) · Students view their own record · Parents view their child's record |
| Where it lives | Teacher app /dashboard/classes/:sectionId/attendance and the bottom-nav shortcut /attendance · Student app /dashboard/school/attendance · Parent app /attendance |
| Statuses | Present · Absent · Late · Excused (Excused is set by admin/back-office; the teacher UI exposes only P / A / L) |
| Triggers notifications? | Yes — push to the parent when a student is marked Absent |
| Related features | Notifications · Student Analytics · Notice Board & Alerts |
How it flows
Status lifecycle
The teacher UI shows Excused as if it were Absent (same red pill), but parent and student views render it as a distinct badge.
Step-by-step
1. Teacher opens attendance for a section
- App / route: Teacher app →
/dashboard/classes/:sectionId/attendance(entered from My Classes → Class Detail → Attendance), or the bottom-nav shortcut /attendance that lists today's class teacher sections. - The header shows
Class-Section · Day, Date. A week number is shown under the date. - Date selector chevrons let the teacher scrub backwards through past days for read-only review. The right chevron is disabled on today.
- Search box filters the roster by student name; Mark All Present is shown only when (a) date == today and (b) the user is the class teacher of this section.
2. Teacher marks each student
- Each row has three round buttons: P (teal), A (pink), L (yellow).
- Tap toggles the chosen status; tapping the same button again does NOT clear it (re-tap a different one to change).
- Mark All Present flips every row to P in one tap. Individual rows can still be edited afterwards.
- The bottom summary bar shows live counts:
n Present · n Absent · n Late.
3. Teacher submits
- The Submit Attendance button appears only on today + only for the class teacher.
- Submit is blocked if zero students have been marked.
- On success, a toast confirms; the page re-fetches and now shows previously-submitted rows for that day. Re-submitting overwrites — there is no separate "edit" mode.
4. Parent push for Absent students
- Each student marked Absent triggers a push + in-app notification to the linked parent: e.g. "Aarav was marked absent today."
- Late and Present do not push.
5. Student view
- App / route: Student app →
/dashboard/school/attendance(reachable via School Hub). - Two side-by-side circular cards: This Month and This Year, each showing
attended / totaland%. - "Attended" counts
Present + Late + Excused(Absent is the only non-attended status for the percentage). - A monthly calendar grid below colour-codes each day by status.
6. Parent view
- App / route: Parent app →
/attendance. - Hero card with a circular progress ring: Overall Attendance % = present / total.
- 2 × 2 stats grid: Present · Absent · Late · Total.
- Below, records grouped by month, sorted newest-first, each row
Day, dd Mon+ a status pill. - If the parent has multiple children, the page resolves to the first linked student by default; the active child can be passed in via navigation state from the child switcher.
Edge cases & things to test
- Subject teacher tries to mark: a teacher who teaches the subject but is NOT the class teacher of the section opens the page → buttons and Submit must be disabled, and the existing marks must still be visible read-only.
- Past date: the teacher scrolls back to yesterday → all action buttons disabled, summary still shows counts for that day.
- Future date: the next-day chevron must be disabled on today.
- Re-submit same day: teacher marks, submits, then changes one student and submits again → the second submission should overwrite without creating duplicates.
- Mark-All-Present then individual override: tap Mark All Present, then change one student to A → only that one should be A; submit count = (n-1) Present + 1 Absent.
- Empty submit: every student left unmarked → Submit shows an error toast and does not call the server.
- Roster change mid-day: a student is added to the section after attendance was already submitted → opening the page should show the new student as unmarked while keeping the others' marks intact.
- Parent push for Absent: mark 5 students Absent in a section of 30 → exactly 5 absent-pushes should fire, none for Present/Late students.
- Multi-child parent: parent with 2 kids in different sections marks attendance for kid A → opening parent attendance should default to child A; switching shows child B's separate record.
- Excused vs Absent rendering: a record set to Excused via back-office must render as Absent in the teacher UI (P/A/L tri-state) but as Excused in student and parent views.
- Percentage with zero records: brand-new student with no attendance yet → both this-month and this-year cards must show 0% / 0 of 0 without dividing-by-zero.
- Time-zone: marking just before midnight should record under the local calendar day shown in the header, not UTC.
- Offline submit: teacher marks while offline and taps Submit → either show a clear error or queue and retry; never silently drop.
- Late as attended: Late should count toward attended on the student/parent percentage, but should still show as a yellow pill, not collapse into Present.
Related
- Student Analytics — attendance feeds the daily quest "be present today" and weekly trends
- Notifications — absent-push fan-out
- Notice Board & Alerts — holiday alerts implicitly suppress attendance for that day