Skip to content

Conversation

@gumaerc
Copy link
Contributor

@gumaerc gumaerc commented Nov 4, 2025

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/9101

Description (What does it do?)

This PR fixes the logic controlling the text of the CTA on dashboard card buttons. "View" is now used as the verb in cases where the end date of the course has passed or the enrollment status is "completed."

How can this be tested?

  • Make sure you have a locally running instance of MITx Online and have set it up to be run on the same Keycloak / APISIX instance as Learn, as described in the Learn README
  • Spin up mit-learn on this branch, linked to your instance of MITx Online
  • Make sure you are enrolled in multiple courses, either through a B2B organization / contract or personal enrollments on your test account
  • Make sure one of the enrollments is marked as completed
  • Log in to the Learn dashboard and view your enrollments
  • Verify that the completed enrollment shows a button that says "View" and the uncompleted one says "Continue"

@gumaerc gumaerc added the Needs Review An open Pull Request that is ready for review label Nov 4, 2025
Copy link
Contributor

@jonkafton jonkafton left a comment

Choose a reason for hiding this comment

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

👍

Would be good to add a test to cover enrollmentStatus not completed and end date in past -> "View Course".

@gumaerc gumaerc merged commit fe69436 into main Nov 5, 2025
13 checks passed
@gumaerc gumaerc deleted the cg/fix-dashboard-completed-module-cta-text branch November 5, 2025 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review An open Pull Request that is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants