add one click enroll functionality to dashboard cards #2319
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/7651
Description (What does it do?)
This PR adds the ability to utilize the "one click enroll" B2B API in MITx Online. Cards for courses in
OrganizationContent
that are part of your org but you are not yet enrolled in will have a button that says "Enroll" instead of "Continue Course." Clicking this button enrolls you in the course, after which you can click "Continue Course" as normal.How can this be tested?
In order to test this, you need a basic installation of
mitxonline
up and running with example data in it. You may be able to skip one or more steps if you have already done them:hosts
redirects for the following domains, replacing the example IP with your local IP address (Google how to get this if unsure, mine is 192.168.1.50)mitxonline
: https://github.com/mitodl/mitxonline.env
file with the following values:mitxonline
withdocker compose up --build -d
docker compose exec web ./manage.py promote_user --promote --superuser [email protected]
docker compose exec web ./manage.py populate_course_data
pants docs ::
dist/sphinx/index.html
, read the section on generating a B2B organization / contract and create one, adding some of the test courses to itProgram
and add some courses to the program that are included in your B2B org, making sure to mark the program as "live"mit-learn
, we need to set some env variables (note that we are intentionally misconfiguring the cookie domain):enrollment-dashboard
andmitlearn-organization-dashboard
feature flags for all usersMIT Learn
[email protected]
test user