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

[BB-9491] fix 404 pages on course details for other catalogs #8

Merged

Conversation

tecoholic
Copy link
Member

The previous PR #7 filtered the courses to the single course run allowed in the enteprise-catalog. However, the solution had the bug of not setting the correct activeCourseRun. So, only the enterprise learners with the "advertisedCourseRun" could see the details.

This PR fixes that bug by setting the activeCourseRun of the CourseService and patching the getActiveCourseRun utility function to return only the available course run, when only 1 is present.

Before

image

After

image

Testing Instructions

Similar to the instructions from #7 for setup. Then switch to the second enterprise and load the course details page in Enterprise Learner Portal.

  1. In the BB-8825-custom-ui branch - The page would show a 404 page.
  2. Switch to the PR branch - It should show the "Enroll" button (with or without warning dependending on the subsidy or license status).

@tecoholic tecoholic force-pushed the tecoholic/BB-9491-limit-corurse-runs branch from 3795c6a to 9b8db24 Compare January 20, 2025 06:38
@tecoholic tecoholic force-pushed the tecoholic/BB-9491-limit-corurse-runs branch from 9b8db24 to 2ca650c Compare January 20, 2025 06:41
Copy link
Member

@Agrendalath Agrendalath left a comment

Choose a reason for hiding this comment

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

👍

  • I tested this: checked that the active course run is set
  • I read through the code
  • I checked for accessibility issues: n/a
  • Includes documentation: n/a
  • Added to the Code Drift project board (for backports)

@Agrendalath Agrendalath merged commit f238442 into tecoholic/BB-8825-custom-ui Jan 20, 2025
2 of 3 checks passed
@Agrendalath Agrendalath deleted the tecoholic/BB-9491-limit-corurse-runs branch January 20, 2025 13:35
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.

2 participants