feat(k12): plan 13.2 — daily/per-period attendance with CALPADS export#202
Merged
Conversation
…t (migration 217) Implements full attendance tracking for K-12 schools: **Database (migration 217)** - `course.attendance_codes` — configurable per-org attendance codes (P, AU, AE, TU, TE defaults; pluggable for CALPADS and other states) - `course.attendance_records` — per-student per-section records with period support (elementary daily mode + secondary per-period mode) - `ff_attendance` feature flag added to platform_app_settings **Server** - `repos/attendance` — ListCodes, UpsertCode, DeleteCode, SeedDefaultCodes, ListRosterForSection, ListForSection, BatchUpsert (upsert/idempotent), ListForStudent, DashboardForOrgUnit, IsWithinEditWindow (5-day cutoff) - HTTP handlers: section attendance GET/PUT, student history, school dashboard, admin codes CRUD, synchronous CSV/CALPADS export, parent view - 5-day edit window enforced for non-admin instructors (AC-4) - FERPA-compliant access: instructors see only their sections; parents see only linked children; admins see all **Frontend** - `CourseAttendance.tsx` — role=grid roll-taking UI, keyboard-navigable, bulk "Mark all present", live ARIA announcements (AC-1, AC-5) - `AttendanceDashboard.tsx` — school-level per-section absence dashboard - `AttendanceExport.tsx` — CSV and CALPADS SB format export UI (AC-2) - `attendance-api.ts` — typed API client for all attendance endpoints - Routes: `/courses/:code/attendance`, `/admin/attendance/dashboard`, `/admin/attendance/export` **Tests** - 3 Go nodb tests (routes registered, 401 without auth) - 17 Playwright e2e tests (auth guards, codes CRUD, batch save, idempotency, edit-window enforcement, CALPADS export, parent access control) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
course.attendance_codesandcourse.attendance_recordstables; addsff_attendancefeature flag toplatform_app_settingsrole="grid", ARIA live regions), admin attendance dashboard, CALPADS export UI; routes wired intoapp.tsxAcceptance criteria coverage
role="grid", Space/Enter key cycle, sr-only live regionTest plan
e2e/tests/attendance.spec.ts)attendance_nodb_test.go)go test ./...)tsc -b)Files changed
server/migrations/217_attendance.sqlserver/internal/repos/attendance/repo.goserver/internal/httpserver/attendance_http.goserver/internal/httpserver/attendance_nodb_test.goserver/internal/httpserver/server.go(+1 line)clients/web/src/lib/attendance-api.tsCourseAttendance.tsx,AttendanceDashboard.tsx,AttendanceExport.tsxclients/web/src/app.tsx(+3 routes)e2e/tests/attendance.spec.tsdocs/completed/13-k12-specific/🤖 Generated with Claude Code