Reported from use: enrolling multiple students in a group class is impossible. The first enrolment goes through, the class card then reads "You are enrolled in this class." with a Withdraw button, and there is no way to enrol a second child in the same class.
Cause
The server has always been per-student — EnrollmentEndpoint::enroll() checks hasActiveEnrollment( $offeringId, $studentId ), and GET /enrollments returns the guardian's whole household. The class page is what collapses them: assets/js/group-classes.js built its enrolment lookup as Map<offering_id, enrollment_id>, so any one household member's enrolment marked the class as "yours" for the entire account:
student_id never entered the key. The Enrol button was then rendered only when the map had no entry for the class, so it disappeared for every remaining student in the household.
Expected
Each enrolled student gets their own line on the card, named, with their own Withdraw button.
The Enrol button stays until everyone the account may enrol is in the class.
The "Who is this for?" picker offers only students not already enrolled.
Notes
No data is wrong — seats were always recorded per student, so existing enrolments need no repair. Purely a front-end fix.
Reported from use: enrolling multiple students in a group class is impossible. The first enrolment goes through, the class card then reads "You are enrolled in this class." with a **Withdraw** button, and there is no way to enrol a second child in the same class.
## Cause
The server has always been per-student — `EnrollmentEndpoint::enroll()` checks `hasActiveEnrollment( $offeringId, $studentId )`, and `GET /enrollments` returns the guardian's whole household. The class page is what collapses them: `assets/js/group-classes.js` built its enrolment lookup as `Map<offering_id, enrollment_id>`, so any one household member's enrolment marked the class as "yours" for the entire account:
```js
new Map(enrollments
.filter((e) => e.status === 'active')
.map((e) => [Number(e.offering_id), e.id]))
```
`student_id` never entered the key. The Enrol button was then rendered only when the map had no entry for the class, so it disappeared for every remaining student in the household.
## Expected
- Each enrolled student gets their own line on the card, named, with their own Withdraw button.
- The Enrol button stays until everyone the account may enrol is in the class.
- The "Who is this for?" picker offers only students not already enrolled.
## Notes
No data is wrong — seats were always recorded per student, so existing enrolments need no repair. Purely a front-end fix.
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.
Reported from use: enrolling multiple students in a group class is impossible. The first enrolment goes through, the class card then reads "You are enrolled in this class." with a Withdraw button, and there is no way to enrol a second child in the same class.
Cause
The server has always been per-student —
EnrollmentEndpoint::enroll()checkshasActiveEnrollment( $offeringId, $studentId ), andGET /enrollmentsreturns the guardian's whole household. The class page is what collapses them:assets/js/group-classes.jsbuilt its enrolment lookup asMap<offering_id, enrollment_id>, so any one household member's enrolment marked the class as "yours" for the entire account:student_idnever entered the key. The Enrol button was then rendered only when the map had no entry for the class, so it disappeared for every remaining student in the household.Expected
Notes
No data is wrong — seats were always recorded per student, so existing enrolments need no repair. Purely a front-end fix.