Show enrolment status on the student group classes page instead of the Enrol button #61

Closed
opened 2026-07-06 02:40:41 +00:00 by thatguygriff · 0 comments
Owner

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
## 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
thatguygriff added the enhancement label 2026-07-06 02:40:41 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Unsupervised/unsupervised-scheduler#61