Skip to content

Conversation

@haftamuk
Copy link
Contributor

@haftamuk haftamuk commented Jul 31, 2025

This PR introduces support for subsection (sequential) prerequisites in the OLX course format. Course authors can now define prerequisite relationships between subsections with configurable completion criteria including minimum score and completion percentage requirements.

Problem Statement

Currently, Open edX lacks the ability to define prerequisite relationships between subsections at the OLX level. This prevents course authors from enforcing learning pathways where students must complete certain subsections before accessing others, which is crucial for structured learning experiences.

Proposed Solution

  • Extend the element in OLX to support prerequisite definitions
  • Add a new child element with configurable requirements
  • Maintain full backward compatibility with existing OLX courses
<sequential display_name="..." ...>
  <prerequisite 
    url_name="SEQUENTIAL-ID"
    min_score="MIN-SCORE-VALUE"
    min_completion="MIN-COMPLETION-SCORE"
  />
  <vertical url_name="..."/>
</sequential>

Supporting information

  1. Unit Prerequisites Lost During Course Export/Import #36995
  2. https://discuss.openedx.org/t/request-for-comments-course-export-import-and-re-run/16508?u=haftamu.kebede

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jul 31, 2025
@openedx-webhooks
Copy link

Thanks for the pull request, @haftamuk!

This repository is currently maintained by @openedx/wg-maintenance-edx-platform.

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.

🔘 Update the status of your PR

Your PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate.


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.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Jul 31, 2025
@haftamuk haftamuk changed the base branch from master to release/teak July 31, 2025 12:07
@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Aug 5, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Needs Tests Run or CLA Signed in Contributions Aug 5, 2025
@Cup0fCoffee
Copy link
Contributor

@haftamuk Try adding load_services_for_studio function call to export_olx function body, I think this should resolve your issue with getting no services when trying to export the course.

@mphilbrick211 mphilbrick211 moved this from Needs Tests Run or CLA Signed to Waiting on Author in Contributions Aug 6, 2025
@mphilbrick211 mphilbrick211 removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Aug 6, 2025
logging.warning(f'INSPECTING-LOG get_prereq_metadata type is = %s', type(self))
logging.warning(f'INSPECTING-LOG get_prereq_metadata vars is = %s', vars(self))

gating_service = self.runtime.service(self, 'gating')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Cup0fCoffee This always returns an empty object.

logging.warning(f'INSPECTING-LOG course_id is = %s', course_id)
logging.warning(f'INSPECTING-LOG content_id is = %s', content_id)

milestone = self.get_prereq_metadata(course_id, content_id)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The values to be exported will be populated from the results found at milestone object. @Cup0fCoffee

@mphilbrick211
Copy link

Hi @haftamuk! Just checking to see if this pull request is still in progress?

@mphilbrick211
Copy link

Closing for now due to inactivity. Can reopen if needed. Thanks!

@github-project-automation github-project-automation bot moved this from Waiting on Author to Done in Contributions Sep 24, 2025
@mphilbrick211 mphilbrick211 added the closed inactivity PR was closed because the author abandoned it label Sep 24, 2025
@haftamuk
Copy link
Contributor Author

@mphilbrick211 I am planning to put more time in this the coming days! If you may kindly reopen this

@mphilbrick211
Copy link

@haftamuk Would you be able to create a new pull request? I wasn't able to reopen this one. Looks like this one can't be re-opened because the branch on your end was removed. Sorry for any confusion.

@haftamuk
Copy link
Contributor Author

@haftamuk Would you be able to create a new pull request? I wasn't able to reopen this one. Looks like this one can't be re-opened because the branch on your end was removed. Sorry for any confusion.

Here is the new PR

@haftamuk
Copy link
Contributor Author

haftamuk commented Oct 15, 2025

@mphilbrick211 Yes. here is the new PR I am working on! Kindly if you can conduct a review on it or facilitate to engage someone to do a review. The bug requires some data formatting considerations that require feedback in the early stages i.e. on data export before we work on import and course re-run!

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

closed inactivity PR was closed because the author abandoned it open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants