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

feat: Avoid copy/edit multilevel blocks in libraries [FC-0076] #1652

Conversation

ChrisChV
Copy link
Contributor

@ChrisChV ChrisChV commented Feb 7, 2025

Description

Multilevel blocks are not supported in libraries. This PR avoids copy/edit multilevel blocks.

Useful information to include:

  • Which edX user roles will this change impact? "Course Author"

Supporting information

Testing instructions

  • Go to a Course
  • Go to Settings > Advanced Settings on the header menu
  • Make sure you have conditional, problem-builder, and step-builder on the "Advanced Module List"
  • Ensure you have conditional, problem-builder, step-builder on the LIBRARY_SUPPORTED_BLOCKS on the .env.development file of the frontend-app-authoring.
  • Run tutor config save
  • Edit a Unit for a Course
  • Add a Conditional, Problem Builder, and Step Builder to a Unit
  • Copy the blocks and paste them into a library.
  • Verify that you can't paste the blocks.

Other information

N/A

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

openedx-webhooks commented Feb 7, 2025

Thanks for the pull request, @ChrisChV!

This repository is currently maintained by @openedx/2u-tnl.

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.

@ChrisChV ChrisChV changed the title feat: Avoid copy/edit multilevel blocks in libraries feat: Avoid copy/edit multilevel blocks in libraries [FC-0076] Feb 7, 2025
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.25%. Comparing base (05dddce) to head (2dfcbab).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1652   +/-   ##
=======================================
  Coverage   93.24%   93.25%           
=======================================
  Files        1101     1101           
  Lines       21859    21867    +8     
  Branches     4643     4724   +81     
=======================================
+ Hits        20383    20391    +8     
  Misses       1411     1411           
  Partials       65       65           

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

@rpenido
Copy link
Contributor

rpenido commented Feb 7, 2025

Hi @ChrisChV! Do you think it is necessary?
Just leaving these blocks outside of LIBRARY_SUPPORTED_BLOCKS won't be enough?

@ChrisChV
Copy link
Contributor Author

Just leaving these blocks outside of LIBRARY_SUPPORTED_BLOCKS won't be enough?

My concern is that since it is an environment variable, someone implementing the platform can add such blocks to LIBRARY_SUPPORTED_BLOCKS and cause errors. Also, in the future, advanced blocks will work like courses. There will be a configuration per library, and I think that is the first way to know that these blocks are not supported. What do you think? @rpenido @navinkarkera @pomegranited

@navinkarkera
Copy link
Contributor

@ChrisChV I am also not sure if this is really required and I understand that it adds an additional hard coded check to avoid errors.

@pomegranited
Copy link
Contributor

@ChrisChV I don't think this is necessary -- if people override LIBRARY_SUPPORTED_BLOCKS then the effects are on them :)

Also -- since MULTI_LEVEL_XBLOCKS isn't customizable, so if I've got a custom XBlock with children, I can't add mine to this list (again, see above -- I'd just omit them from LIBRARY_SUPPORTED_BLOCKS).

@ChrisChV
Copy link
Contributor Author

@rpenido @navinkarkera @pomegranited Thanks for the feedback! You are right, it is unnecessary now. So, there would be nothing more to add to openedx/edx-platform#36199, I think it is ready to be merged.

@ChrisChV ChrisChV closed this Feb 11, 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
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants