Add student administration view (studio-admin) #24

Merged
thatguygriff merged 1 commits from feature/student-administration into main 2026-06-08 12:40:24 +00:00
Owner

Implements #22 — a read-only studio-admin Students area.

What's included

  • Auth\StudentController (gated on manage_students):
    • List — all us_student users with name, email, registered date, and quick counts (upcoming lessons, active group enrolments); each row links to the detail page.
    • Detail (?student_id=) — account info, Upcoming and Past lessons (offering, instructor, status), and group-class enrolments.
  • Auth\StudentSchedule::partition() — pure, unit-tested upcoming/past split (upcoming ascending, past descending; rows without a slot time fall to past).
  • Single-query countsBookingRepository::countUpcomingForStudent, EnrollmentRepository::countActiveForStudent (tested).
  • Templatestemplates/admin/students.php, templates/admin/student-detail.php.
  • Wiring — a Students admin menu in AdminMenu (no Plugin change; the repos were already available there).
  • Docs — README status flipped to implemented; feature spec updated.

Notes

  • Read-only this iteration (no cancel/edit actions). Payment history slots into the detail when Payments (#7) lands. No new tables or capabilities — built on existing repositories + WP users, reusing manage_students.

Tests

  • tests/Unit/Auth/StudentScheduleTest.php + the two repo count tests.
  • composer test (127 tests), composer cs, PHPStan level 6, and no-debug all pass.

Refs #22

🤖 Generated with Claude Code

Implements **#22** — a read-only studio-admin **Students** area. ## What's included - **`Auth\StudentController`** (gated on `manage_students`): - **List** — all `us_student` users with name, email, registered date, and quick counts (upcoming lessons, active group enrolments); each row links to the detail page. - **Detail** (`?student_id=`) — account info, **Upcoming** and **Past** lessons (offering, instructor, status), and group-class enrolments. - **`Auth\StudentSchedule::partition()`** — pure, unit-tested upcoming/past split (upcoming ascending, past descending; rows without a slot time fall to past). - **Single-query counts** — `BookingRepository::countUpcomingForStudent`, `EnrollmentRepository::countActiveForStudent` (tested). - **Templates** — `templates/admin/students.php`, `templates/admin/student-detail.php`. - **Wiring** — a **Students** admin menu in `AdminMenu` (no `Plugin` change; the repos were already available there). - **Docs** — README status flipped to implemented; feature spec updated. ## Notes - Read-only this iteration (no cancel/edit actions). Payment history slots into the detail when **Payments (#7)** lands. No new tables or capabilities — built on existing repositories + WP users, reusing `manage_students`. ## Tests - `tests/Unit/Auth/StudentScheduleTest.php` + the two repo count tests. - `composer test` (127 tests), `composer cs`, PHPStan level 6, and no-debug all pass. Refs #22 🤖 Generated with [Claude Code](https://claude.com/claude-code)
thatguygriff added 1 commit 2026-06-08 12:28:46 +00:00
Add student administration view (studio-admin)
CI / Tests (PHP 8.1) (pull_request) Successful in 43s
CI / Coding Standards (pull_request) Successful in 56s
CI / PHPStan (pull_request) Successful in 57s
CI / No Debug Code (pull_request) Successful in 2s
CI / Tests (PHP 8.2) (pull_request) Successful in 44s
CI / Tests (PHP 8.3) (pull_request) Successful in 48s
CI / Build Plugin Zip (pull_request) Has been skipped
8fb5ff8270
Implements #22: a read-only Students area for studio admins.

- StudentController (manage_students): a list of us_student users with
  upcoming-lesson and active-enrolment counts, each linking to a detail page
  showing account info, upcoming/past lessons (offering, instructor, status),
  and group-class enrolments.
- StudentSchedule::partition() — pure, unit-tested upcoming/past split.
- Repo counts: BookingRepository::countUpcomingForStudent and
  EnrollmentRepository::countActiveForStudent (single-query, tested).
- Templates: templates/admin/students.php, student-detail.php.
- Students admin menu wired in AdminMenu (no Plugin change — the repos were
  already available there).
- Docs: README status flipped to implemented; feature spec updated.

Payment history slots into the detail when Payments (#7) lands.

Tests: StudentScheduleTest + the two repo count tests. composer test (127),
cs, and PHPStan level 6 all pass.

Refs #22

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
thatguygriff merged commit 071ef7fc2a into main 2026-06-08 12:40:24 +00:00
thatguygriff deleted branch feature/student-administration 2026-06-08 12:40:24 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Unsupervised/unsupervised-scheduler#24