Skip to content

fix(integrations): make an allocation's assignable flag toggleable pe… - #194

Merged
Sheryar-Ahmed merged 1 commit into
mainfrom
fix/integration-allocation-allowed-toggle
Nov 6, 2026
Merged

Sheryar-Ahmed merged 1 commit into
mainfrom
fix/integration-allocation-allowed-toggle

Conversation

@Sheryar-Ahmed

Copy link
Copy Markdown
Collaborator

Pathment's mentor course picker came back empty for the Pathment org while all 22 courses sat in its catalog. The integration itself was healthy: credentials verified, the right org resolved, and GET /integrations/v1/courses answered 200 {"courses":[]}. GET /integrations/v1/allocations showed why -- every row was PUBLISHED, unexpired and had 400 free seats, but carried isAllowed: false, which is the one condition listAllocatedCourses filters on.

isAllowed could only be set by the bulk allocation form's single checkbox, which applies to every selected course at once, so one save with it unticked disabled a whole catalog silently. The table still showed those courses "In catalog" with their seats and expiry; the only hint was a quiet "No" in the Allowed column, with no control to change it. The leaderboard flag in the next column already had a per-row toggle. This one did not, so the only way back was re-selecting every course in the bulk form.

Add PATCH /organizations/:orgId/allocations/:courseId/allowed and a per-row toggle in the admin table, mirroring the leaderboard control. The write is audited under organization.allocate, because it grants or withdraws access. Rename the column to Assignable and show a destructive "Not assignable" badge when the flag is off, so a disabled allocation reads as a fault rather than as a neutral status.

Tests: the integrations suite now asserts that an un-allowed course drops out of /courses while /allocations still reports it, which is exactly what the consumer sees; the admin suite covers the toggle both ways and a 404 for an allocation that does not exist.

…r course

Pathment's mentor course picker came back empty for the Pathment org while
all 22 courses sat in its catalog. The integration itself was healthy:
credentials verified, the right org resolved, and GET /integrations/v1/courses
answered 200 {"courses":[]}. GET /integrations/v1/allocations showed why --
every row was PUBLISHED, unexpired and had 400 free seats, but carried
isAllowed: false, which is the one condition listAllocatedCourses filters on.

isAllowed could only be set by the bulk allocation form's single checkbox,
which applies to every selected course at once, so one save with it unticked
disabled a whole catalog silently. The table still showed those courses "In
catalog" with their seats and expiry; the only hint was a quiet "No" in the
Allowed column, with no control to change it. The leaderboard flag in the next
column already had a per-row toggle. This one did not, so the only way back
was re-selecting every course in the bulk form.

Add PATCH /organizations/:orgId/allocations/:courseId/allowed and a per-row
toggle in the admin table, mirroring the leaderboard control. The write is
audited under organization.allocate, because it grants or withdraws access.
Rename the column to Assignable and show a destructive "Not assignable" badge
when the flag is off, so a disabled allocation reads as a fault rather than as
a neutral status.

Tests: the integrations suite now asserts that an un-allowed course drops out
of /courses while /allocations still reports it, which is exactly what the
consumer sees; the admin suite covers the toggle both ways and a 404 for an
allocation that does not exist.
@Sheryar-Ahmed
Sheryar-Ahmed merged commit 5e7ac4d into main Nov 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant