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).
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.
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)
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 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements #22 — a read-only studio-admin Students area.
What's included
Auth\StudentController(gated onmanage_students):us_studentusers with name, email, registered date, and quick counts (upcoming lessons, active group enrolments); each row links to the detail page.?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).BookingRepository::countUpcomingForStudent,EnrollmentRepository::countActiveForStudent(tested).templates/admin/students.php,templates/admin/student-detail.php.AdminMenu(noPluginchange; the repos were already available there).Notes
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