Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check to make sure the end date and upgrade deadline haven't passed before grabbing your audit enrollment #2044

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

jkachel
Copy link
Contributor

@jkachel jkachel commented Jan 3, 2024

What are the relevant tickets?

Closes mitodl/hq#3295

Description (What does it do?)

If you have an existing enrollment in a course that is upgradeable, the enroll now button component will try to funnel you into upgrading that enrollment. However, it did this funneling even if the run's deadline had passed. This fixes that by adding some checks to make sure the course run is actually eligible for upgrade.

How can this be tested?

Set up two course runs (and related course, if necessary). One should be fully in the past and one should be eligible for enrollment and upgrade now. The course runs must have products and the course must have a CMS page. Create an audit enrollment in the past course run, then load the course page. You should see the normal messaging - current upgrade deadline and price, Enroll Now button - and clicking Enroll Now should prompt you to upgrade into the new course.

@pdpinch
Copy link
Member

pdpinch commented Jan 3, 2024

What happens if you have an existing audit enrollment but you want to re-enroll in an upcoming course run. Is there a way to do that? (sorry if this is off-topic)

@JenniWhitman
Copy link
Contributor

What happens if you have an existing audit enrollment but you want to re-enroll in an upcoming course run.

@pdpinch So I just tested this and no, when I enrolled myself in a current run, then made one in the future that is enrollable now (enrollment opening for next run while one is in session) I can see it in the more dates, but I can't select it and the enroll now button is in the enrolled state. I'm not sure how to show both that you're enrolled and that you can enroll, though?

@jkachel
Copy link
Contributor Author

jkachel commented Jan 3, 2024

I think I noted this in https://github.com/mitodl/hq/issues/3109 .. if there are multiple course runs and at least some of them don't have products you're pretty well stuck with the one the app chooses for you. (This is a side effect of pulling the selector from the info box and moving it into the upsell dialog.) If all the course runs in question here have products, though, you should get the dropdown in the upsell dialog and you should be able to enroll in the other course from there.

Copy link
Contributor

@JenniWhitman JenniWhitman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works. Barring Peter's question being a blocker it passed all scenarios I tried to break it in :)

@jkachel jkachel merged commit 482f2f1 into main Jan 3, 2024
3 checks passed
@odlbot odlbot mentioned this pull request Jan 3, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants