Group class dates, single-class embed mode, and offering editing #59

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

Problem

Group class offerings have no usable dates, and offerings are write-once:

  1. The us_offerings table has term_start/term_end columns and the REST API accepts them, but the wp-admin Offerings form never collects them — the only schedule information an instructor can give students is the free-text schedule note. Classes are sometimes one-off, sometimes repeat weekly a set number of times.
  2. [us_group_classes] always renders the full browsable catalog. There is no way to embed the enrolment flow for one class on a page dedicated to that class.
  3. Offerings cannot be edited after creation from the admin screen — no edit form, no way to fix a price or schedule, no way to deactivate an offering (is_active is REST-only), and the form never collected description at all.

Proposed behaviour

Term dates

  • Add-offering form gains a start date plus a sessions control: one-off (term ends the day it starts) or weekly for N sessions (end = start + (N−1) weeks)
  • Offerings list shows the term; the student-facing class card shows the date or date range with the weekly session count

Single-class embed

  • [us_group_classes offering="<id>"] restricts the page to that class, with a matching block sidebar option — a dropdown of active group classes fetched from GET /offerings?kind=group_class
  • A pinned class that is inactive or missing shows "not open for enrolment" rather than falling back to the catalog

Offering editing

  • Edit button per row prefills the same form; saving updates in place
  • Owner and currency are preserved on update; non-admin instructors can only edit their own offerings
  • Form gains description and an Active (open for registration) toggle
## Problem Group class offerings have no usable dates, and offerings are write-once: 1. The `us_offerings` table has `term_start`/`term_end` columns and the REST API accepts them, but the wp-admin Offerings form never collects them — the only schedule information an instructor can give students is the free-text schedule note. Classes are sometimes one-off, sometimes repeat weekly a set number of times. 2. `[us_group_classes]` always renders the full browsable catalog. There is no way to embed the enrolment flow for **one** class on a page dedicated to that class. 3. Offerings cannot be edited after creation from the admin screen — no edit form, no way to fix a price or schedule, no way to deactivate an offering (`is_active` is REST-only), and the form never collected `description` at all. ## Proposed behaviour **Term dates** - Add-offering form gains a start date plus a sessions control: one-off (term ends the day it starts) or weekly for N sessions (end = start + (N−1) weeks) - Offerings list shows the term; the student-facing class card shows the date or date range with the weekly session count **Single-class embed** - `[us_group_classes offering="<id>"]` restricts the page to that class, with a matching block sidebar option — a dropdown of active group classes fetched from `GET /offerings?kind=group_class` - A pinned class that is inactive or missing shows "not open for enrolment" rather than falling back to the catalog **Offering editing** - Edit button per row prefills the same form; saving updates in place - Owner and currency are preserved on update; non-admin instructors can only edit their own offerings - Form gains description and an Active (open for registration) toggle
thatguygriff added the feature label 2026-07-06 02:18:20 +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#59