Skip to content

feat: student enrollment nd attendance improvement - #24

Merged
chamals3n4 merged 1 commit into
developmentfrom
student-enrollment-and-attendance
Jul 22, 2026
Merged

feat: student enrollment nd attendance improvement#24
chamals3n4 merged 1 commit into
developmentfrom
student-enrollment-and-attendance

Conversation

@chamals3n4

Copy link
Copy Markdown
Member

Description

This PR adds the Subject Enrollment feature to the admin portal and improves the student and attendance workflows, along with a few fixes found while testing.

What's new / changed:

  • Subject Enrollment (new feature). The backend enrollment engine already existed but had no UI. Added a "Subject Enrollment" tab on the student profile where an admin can assign subjects to a student within each selection group, respecting the group's min/max pick rules. Compulsory groups (where all subjects are required) are ticked automatically, and the curriculum level is pre-selected from the student's class grade.
  • Student list filters. The student list can now be filtered by grade, class, and gender, and shows each student's current class in a new column. The list endpoint was extended to include the student's current-year class and grade.
  • Attendance – admins can now create sessions. Attendance sessions were tied to teacher profiles, so an admin (who has no teacher profile) could not create one. Sessions are now attributed to the acting user, and the user is provisioned automatically if their local record is missing.
  • Attendance is view-only for admins. Admins can view marked attendance but no longer see the marking controls; teachers still mark attendance as before.
  • Edit class details. Admins can now edit a class name from the class page (this was previously read-only even though the backend supported it).
  • Student delete fix. Deleting a student whose Asgardeo account was already removed no longer gets stuck; a missing account is treated as already-deleted.
  • Small UI fix. Removed the dark-blue header background on the attendance marking page.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe above)

Affected areas

  • Backend (backend/)
  • Frontend (frontend/)
  • Database migrations (backend/db/migrations/)

How was this tested?

  • Backend: go build ./... passes.
  • Frontend: pnpm lint and pnpm build pass.
  • Manual verification: subject enrollment assign/save, student filtering by grade/class, admin creating and viewing attendance, editing a class name, and deleting a student.

Checklist

  • go build ./... passes (no go test — the project has no test suite yet)
  • pnpm lint and pnpm build pass
  • Ran sqlc generate after editing queries/migrations — not run yet; the generated files were hand-synced to match, please run sqlc generate to confirm before merge
  • No generated files in backend/db/sqlc/ were hand-edited — generated files were hand-synced for attendance.sql.go, students.sql.go, and querier.go as a stopgap; running sqlc generate should reproduce them identically

Notes for reviewer

  • New migration 000012 re-points attendance_sessions.taken_by to users(id); it runs automatically on server startup.
  • The frontend does not call the backend /me, so the local users table isn't always in sync with Asgardeo. Attendance now self-provisions the acting user to work around this — worth a follow-up to sync users centrally.

@chamals3n4
chamals3n4 merged commit 87ec585 into development Jul 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant