The [us_group_classes] page always renders an Enrol button on every class, even for a class the student is already enrolled in. Clicking it walks them through the questions/policies flow again only to hit 409 already_enrolled at the end — a confusing error path instead of a clear status.
Proposed behaviour
Load the student's own enrolments (GET /enrollments) together with the class catalog
A class with an active enrolment shows "You are enrolled in this class." in place of the Enrol button
Applies to both the browse-all catalog and the single-class embed mode (offering="…")
A cancelled enrolment does not block re-enrolling, matching the server-side duplicate rule
## Problem
The `[us_group_classes]` page always renders an **Enrol** button on every class, even for a class the student is already enrolled in. Clicking it walks them through the questions/policies flow again only to hit `409 already_enrolled` at the end — a confusing error path instead of a clear status.
## Proposed behaviour
- Load the student's own enrolments (`GET /enrollments`) together with the class catalog
- A class with an **active** enrolment shows "You are enrolled in this class." in place of the Enrol button
- Applies to both the browse-all catalog and the single-class embed mode (`offering="…"`)
- A **cancelled** enrolment does not block re-enrolling, matching the server-side duplicate rule
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.
Problem
The
[us_group_classes]page always renders an Enrol button on every class, even for a class the student is already enrolled in. Clicking it walks them through the questions/policies flow again only to hit409 already_enrolledat the end — a confusing error path instead of a clear status.Proposed behaviour
GET /enrollments) together with the class catalogoffering="…")