Add instructor group-class roster view under My Lessons #95

Merged
thatguygriff merged 1 commits from feature/instructor-group-classes into main 2026-07-23 15:58:10 +00:00
Owner

Gives instructors a view of their own group classes and rosters under My Lessons → My Group Classes (view_own_lessons), completing the deferred part of the group-classes spec.

What

  • Lists the instructor's group-class offerings with active-enrolment counts vs. capacity ((N / capacity enrolled), or (N enrolled) when capacity is unlimited).
  • Per-class roster: enrolled students, enrolment status, payment status.
  • Cancelled/completed enrolments stay in the roster but don't count toward the capacity number.

How

  • GroupClassController::renderInstructorPage() groups the instructor's enrolments (existing findByInstructor query) by offering; injects PaymentRepository to resolve each enrolment's payment status.
  • Wired as a submenu under the existing My Lessons menu, inside the same !view_all_lessons guard so owner-operators don't get a duplicate item.
  • New template templates/admin/my-group-classes.php.

No schema change, so no version bump.

Tests

composer test (447 tests), composer lint (PHPStan level 10), and composer cs (PHPCS) all pass. Added tests/Unit/GroupClass/GroupClassControllerTest.php (7 tests: capacity display, active-only counting, free-enrolment dash, cross-class isolation, empty states, capability denial).

Closes #71

🤖 Generated with Claude Code

Gives instructors a view of their own group classes and rosters under **My Lessons → My Group Classes** (`view_own_lessons`), completing the deferred part of the group-classes spec. ## What - Lists the instructor's group-class offerings with active-enrolment counts vs. capacity (`(N / capacity enrolled)`, or `(N enrolled)` when capacity is unlimited). - Per-class roster: enrolled students, enrolment status, payment status. - Cancelled/completed enrolments stay in the roster but don't count toward the capacity number. ## How - `GroupClassController::renderInstructorPage()` groups the instructor's enrolments (existing `findByInstructor` query) by offering; injects `PaymentRepository` to resolve each enrolment's payment status. - Wired as a submenu under the existing **My Lessons** menu, inside the same `!view_all_lessons` guard so owner-operators don't get a duplicate item. - New template `templates/admin/my-group-classes.php`. No schema change, so no version bump. ## Tests `composer test` (447 tests), `composer lint` (PHPStan level 10), and `composer cs` (PHPCS) all pass. Added `tests/Unit/GroupClass/GroupClassControllerTest.php` (7 tests: capacity display, active-only counting, free-enrolment dash, cross-class isolation, empty states, capability denial). Closes #71 🤖 Generated with [Claude Code](https://claude.com/claude-code)
thatguygriff added 1 commit 2026-07-23 15:54:29 +00:00
Add instructor group-class roster view under My Lessons
CI / Tests (PHP 8.2) (pull_request) Successful in 47s
CI / Tests (PHP 8.1) (pull_request) Successful in 38s
CI / No Debug Code (pull_request) Successful in 2s
CI / Coding Standards (pull_request) Successful in 2m50s
CI / PHPStan (pull_request) Successful in 2m54s
CI / Tests (PHP 8.3) (pull_request) Successful in 2m42s
CI / Build Plugin Zip (pull_request) Skipped
5f9d5ffc4f
Instructors can now see their own group classes under My Lessons →
My Group Classes (view_own_lessons): each class shows its active
enrolment count against capacity plus a roster of enrolled students
with enrolment and payment status.

GroupClassController gains renderInstructorPage(), backed by the
existing per-instructor enrolment query and a newly injected
PaymentRepository for payment status. Wired as a submenu under the
existing My Lessons menu, inside the same !view_all_lessons guard so
owner-operators don't get a duplicate item.

Closes #71

Co-Authored-By: Claude Opus 4.8 <[email protected]>
thatguygriff merged commit 25aeba9dc1 into main 2026-07-23 15:58:10 +00:00
thatguygriff deleted branch feature/instructor-group-classes 2026-07-23 15:58:10 +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#95