The Scheduler admin dashboard and instructor "My Lessons" pages showed a raw Slot ID column — the internal availability-slot database ID, which is meaningless to admins and instructors. This replaces it with the lesson's date/time window.
Changes
Booking\LessonController now takes Availability\AvailabilityRepository as a third constructor dependency (wired in AdminMenu; Plugin already passes the repository through).
row() looks up the lesson's slot by slot_id and formats its window via mysql2date('M j, Y g:i A', ...) as e.g. Jul 6, 2026 9:00 AM–10:00 AM. The date is repeated on the end time only when the slot crosses midnight. A lesson whose slot row no longer exists renders an em dash instead of failing.
New tests/Unit/Booking/LessonControllerTest.php renders both the admin dashboard and instructor pages through the real template, asserting the formatted range appears (and "Slot ID" doesn't), plus midnight-crossing and missing-slot cases.
composer test — 225 tests, 695 assertions, all passing
Closes #47
## Summary
The Scheduler admin dashboard and instructor "My Lessons" pages showed a raw **Slot ID** column — the internal availability-slot database ID, which is meaningless to admins and instructors. This replaces it with the lesson's date/time window.
## Changes
- `Booking\LessonController` now takes `Availability\AvailabilityRepository` as a third constructor dependency (wired in `AdminMenu`; `Plugin` already passes the repository through).
- `row()` looks up the lesson's slot by `slot_id` and formats its window via `mysql2date('M j, Y g:i A', ...)` as e.g. **Jul 6, 2026 9:00 AM–10:00 AM**. The date is repeated on the end time only when the slot crosses midnight. A lesson whose slot row no longer exists renders an em dash instead of failing.
- `templates/admin/lessons.php`: "Slot ID" column header becomes "Date/Time"; row-shape docblock updated.
## Tests
New `tests/Unit/Booking/LessonControllerTest.php` renders both the admin dashboard and instructor pages through the real template, asserting the formatted range appears (and "Slot ID" doesn't), plus midnight-crossing and missing-slot cases.
- `composer test` — 225 tests, 695 assertions, all passing
- `composer lint` — PHPStan level 10 clean
- `composer cs` — PHPCS clean
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The admin dashboard and instructor My Lessons pages showed the raw
availability-slot database ID, which is meaningless to admins and
instructors. LessonController now takes AvailabilityRepository, looks up
each lesson's slot, and renders its window as e.g.
"Jul 6, 2026 9:00 AM-10:00 AM" via mysql2date. The date is repeated on
the end time only when a slot crosses midnight, and lessons whose slot
row no longer exists show an em dash.
Closes#47
Co-Authored-By: Claude Fable 5 <[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.
Closes #47
Summary
The Scheduler admin dashboard and instructor "My Lessons" pages showed a raw Slot ID column — the internal availability-slot database ID, which is meaningless to admins and instructors. This replaces it with the lesson's date/time window.
Changes
Booking\LessonControllernow takesAvailability\AvailabilityRepositoryas a third constructor dependency (wired inAdminMenu;Pluginalready passes the repository through).row()looks up the lesson's slot byslot_idand formats its window viamysql2date('M j, Y g:i A', ...)as e.g. Jul 6, 2026 9:00 AM–10:00 AM. The date is repeated on the end time only when the slot crosses midnight. A lesson whose slot row no longer exists renders an em dash instead of failing.templates/admin/lessons.php: "Slot ID" column header becomes "Date/Time"; row-shape docblock updated.Tests
New
tests/Unit/Booking/LessonControllerTest.phprenders both the admin dashboard and instructor pages through the real template, asserting the formatted range appears (and "Slot ID" doesn't), plus midnight-crossing and missing-slot cases.composer test— 225 tests, 695 assertions, all passingcomposer lint— PHPStan level 10 cleancomposer cs— PHPCS clean🤖 Generated with Claude Code