Skip to content

Conversation

@marslanabdulrauf
Copy link
Contributor

Related Ticket

https://github.com/mitodl/hq/issues/9703 (MIT Internal)

Description

Its a small ripple affect from #37335

This pull request updates the logic in the build_block_structure function to ensure that block locations are consistently normalized by removing branch and version information. This change addresses issues when creating Block Structure from modulestore within published_only branch.

Useful information to include:

When creating BlockStructure within published_only branch context the "xblock being changed" contains branch and version info causing comparison issues in next flows to remove inaccessible blocks from the outline.

Testing instructions

Steps to reproduce

  1. Create Course - Add section
  2. Add two subsection with dummy units (text units)
  3. Load the course for student -- You can see 1 Section and 2 subsections each with their own unit (navigation sidebar)
  4. Now add future date to any of the unit
  5. Reload the course page for student -- This block should be removed
  6. Edit the date again and add past date now -- The sub-section should be visible but its not.

Testing

  1. Now checkout to this branch
  2. Repeat the steps from 4-6 and you should see the sub-section this time in the navigation sidebar.
image

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jan 12, 2026
@openedx-webhooks
Copy link

Thanks for the pull request, @marslanabdulrauf!

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.

Details
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.

@pdpinch
Copy link
Contributor

pdpinch commented Jan 12, 2026

@ormsbee can you take a look at this fix up to #37335 ?

Copy link
Contributor

@ormsbee ormsbee left a comment

Choose a reason for hiding this comment

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

Code looks fine, and I appreciate the comments. Can you please add a test case for this that would have failed with the old code?

@ormsbee
Copy link
Contributor

ormsbee commented Jan 12, 2026

@pdpinch, @marslanabdulrauf: Should this also be backported to Ulmo?

@pdpinch
Copy link
Contributor

pdpinch commented Jan 12, 2026

Yes, it needs to be backported.

@marslanabdulrauf marslanabdulrauf force-pushed the marslan/9703-course-content-accessibility-issue branch from 30a7f72 to dfa4497 Compare January 14, 2026 11:21
@marslanabdulrauf marslanabdulrauf force-pushed the marslan/9703-course-content-accessibility-issue branch from dfa4497 to 5cd3aa4 Compare January 14, 2026 13:14
@ormsbee ormsbee enabled auto-merge (squash) January 14, 2026 15:52
@ormsbee ormsbee disabled auto-merge January 15, 2026 01:20
@ormsbee ormsbee merged commit 328b3ee into openedx:master Jan 15, 2026
74 of 114 checks passed
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in Contributions Jan 15, 2026
@ormsbee
Copy link
Contributor

ormsbee commented Jan 15, 2026

Due to CI shenanigans, it took all day before these tests ran, and the openedx/cla check is hanging. Given that I know @marslanabdulrauf is covered under the MIT entity agreement (which out of paranoia I've just re-verified in SalesForce), and that is the only non-passing check, I'm going to use my admin bits to merge this in now.

ormsbee pushed a commit to ormsbee/edx-platform that referenced this pull request Jan 15, 2026
This commit updates the logic in the build_block_structure function to
ensure that block locations are consistently normalized by removing
branch and version information. This change addresses issues when
creating a BlockStructure from modulestore using the published_only
branch. Without this change, we end up comparing versioned keys to
unversioned ones later on, which always yields False.
ormsbee pushed a commit that referenced this pull request Jan 15, 2026
This commit updates the logic in the build_block_structure function to
ensure that block locations are consistently normalized by removing
branch and version information. This change addresses issues when
creating a BlockStructure from modulestore using the published_only
branch. Without this change, we end up comparing versioned keys to
unversioned ones later on, which always yields False.
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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants