Skip to content

feat: [programs API] replace enterprise dependency with plugin hook - #39030

Open
pwnage101 wants to merge 1 commit into
masterfrom
pwnage101/ENT-11575
Open

feat: [programs API] replace enterprise dependency with plugin hook#39030
pwnage101 wants to merge 1 commit into
masterfrom
pwnage101/ENT-11575

Conversation

@pwnage101

@pwnage101 pwnage101 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

The programs API has two variants: B2C and B2B:

  • B2C: GET /api/dashboard/v1/programs/
  • B2B: GET /api/dashboard/v1/programs/{enterprise_uuid}/

The B2B variant uses enterprise internal functions to help filter the response to include only enterprise-subsidized enrollments. This can't go on any longer because we need to remove all enterprise imports from the platform.

This commit replaces those enterprise function calls with a plugin hook point. We introduce the OVERRIDE_PROGRAMS_GET_ENTERPRISE_COURSE_IDS pluggable override which allows the enterprise plugin itself register an implementation, allowing all enterprise imports to be removed from the programs API views.py file.

ENT-11575


For comparison, here's the PR on thee 2U side: edx#439

The programs API has two variants: B2C and B2B:

- B2C: `GET /api/dashboard/v1/programs/`
- B2B: `GET /api/dashboard/v1/programs/{enterprise_uuid}/`

The B2B variant uses enterprise internal functions to help filter the
response to include only enterprise-subsidized enrollments. This can't
go on any longer because we need to remove all enterprise imports from
the platform.

This commit replaces those enterprise function calls with a plugin hook
point. We introduce the `OVERRIDE_PROGRAMS_GET_ENTERPRISE_COURSE_IDS`
pluggable override which allows the enterprise plugin itself register an
implementation, allowing all `enterprise` imports to be removed from the
programs API views.py file.

ENT-11575
@pwnage101
pwnage101 force-pushed the pwnage101/ENT-11575 branch from 2aa7e37 to f0ebfed Compare August 26, 2026 21:20
@pwnage101
pwnage101 marked this pull request as ready for review August 26, 2026 21:20
@pwnage101
pwnage101 enabled auto-merge August 26, 2026 21:21
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