Skip to content

Conversation

Lunyachek
Copy link

Related to this issue - #684

What was done?

  • Added a check for prerequisites (coursewareAccess.hasUnmetPrerequisites) in the useActionDisabledState hook.
  • The Begin Course button is now disabled if the course is blocked by unmet prerequisites.
  • Similar updates were applied to the Resume Course, View Course, and Select Session buttons so their state also reflects course inaccessibility.
  • The logic for disableCourseTitle was updated indirectly through disableViewCourse, so no separate prerequisite check is needed there.

Why it matters

Previously, the Begin Course button could remain active even if a course was locked by unmet prerequisites. This misled users: the button was clickable, but access was blocked by the LMS after navigation.

Now, the restriction is surfaced directly in the UI, improving UX and preventing unnecessary transitions.

Result

  • The Begin Course button (and related actions) correctly reflects course availability.
  • Users immediately see when a course is locked by prerequisites.
  • Component behavior is now more consistent with the API (coursewareAccess.hasUnmetPrerequisites).
2025-09-11.11.40.52.mov

@openedx-webhooks
Copy link

openedx-webhooks commented Sep 11, 2025

Thanks for the pull request, @Lunyachek!

This repository is currently maintained by @2U-aperture.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.


Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

Copy link

codecov bot commented Sep 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.62%. Comparing base (5345d2e) to head (09adaa2).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #716      +/-   ##
==========================================
+ Coverage   97.60%   97.62%   +0.02%     
==========================================
  Files         152      152              
  Lines        1334     1347      +13     
  Branches      231      244      +13     
==========================================
+ Hits         1302     1315      +13     
  Misses         31       31              
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Lunyachek Lunyachek changed the title fix: Disable Begin Course button if course is closed by prerequisites draft: fix: Disable Begin Course button if course is closed by prerequisites Sep 11, 2025
@Lunyachek Lunyachek marked this pull request as draft September 11, 2025 09:24
@Lunyachek Lunyachek changed the title draft: fix: Disable Begin Course button if course is closed by prerequisites fix: Disable Begin Course button if course is closed by prerequisites Sep 11, 2025
@Lunyachek Lunyachek marked this pull request as ready for review September 14, 2025 21:19
@itsjeyd itsjeyd moved this from Needs Triage to Product Review in Contributions Sep 16, 2025
@itsjeyd
Copy link

itsjeyd commented Sep 16, 2025

@Lunyachek Thank you for your contribution! Since it is a user-facing change, you will need to get 👍 for it from a product reviewer before engineering review can start.

@openedx/openedx-product-managers Please have a look at this PR. It is a fast-track change that follows the workflow for bug fixes described here. (= There is no roadmap issue for the change. Product review can happen right here on the PR and/or the corresponding bug report.)

@itsjeyd itsjeyd added the product review PR requires product review before merging label Sep 16, 2025
@sarina
Copy link

sarina commented Sep 16, 2025

Is it possible to say what the prerequisites are? As a learner I think I'd be frustrated by this message:

image

@itsjeyd itsjeyd added the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Sep 23, 2025
@deborahgu deborahgu moved this to Backlog in Aperture-Maintained Sep 25, 2025
@Lunyachek
Copy link
Author

@sarina I left a question in the related thread — #684
We can either just edit the current message, or go deeper and add the course name, like it was in the Legacy Dashboard.

@itsjeyd itsjeyd removed the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Sep 30, 2025
@itsjeyd
Copy link

itsjeyd commented Oct 8, 2025

Reply from Sarina: #684 (comment)

@itsjeyd itsjeyd added the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U product review PR requires product review before merging waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc.

Projects

Status: Backlog
Status: Product Review

Development

Successfully merging this pull request may close these issues.

4 participants