Skip to content

feat: disallow edits to units in courses that are sourced from a library#1833

Merged
bradenmacdonald merged 8 commits intoopenedx:masterfrom
open-craft:rpenido/fal-4112/disallow-edits-to-units-in-courses-from-libraries
Apr 24, 2025
Merged

feat: disallow edits to units in courses that are sourced from a library#1833
bradenmacdonald merged 8 commits intoopenedx:masterfrom
open-craft:rpenido/fal-4112/disallow-edits-to-units-in-courses-from-libraries

Conversation

@rpenido
Copy link
Contributor

@rpenido rpenido commented Apr 18, 2025

Description

This PR disallows edits to units in courses (including title change, children change) that are sourced from a library.

Supporting information

Testing instructions


Private ref: FAL-4112

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

openedx-webhooks commented Apr 18, 2025

Thanks for the pull request, @rpenido!

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.

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.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Apr 18, 2025
@rpenido rpenido force-pushed the rpenido/fal-4112/disallow-edits-to-units-in-courses-from-libraries branch 2 times, most recently from 3cdd8d3 to 38419fc Compare April 18, 2025 16:13
@codecov
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.76%. Comparing base (d6b51ec) to head (1ff27c5).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1833      +/-   ##
==========================================
+ Coverage   93.74%   93.76%   +0.01%     
==========================================
  Files        1146     1146              
  Lines       23824    23881      +57     
  Branches     5022     5030       +8     
==========================================
+ Hits        22334    22391      +57     
  Misses       1422     1422              
  Partials       68       68              

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

@rpenido rpenido force-pushed the rpenido/fal-4112/disallow-edits-to-units-in-courses-from-libraries branch 2 times, most recently from bdac5f3 to 3dc2794 Compare April 21, 2025 14:55
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Apr 23, 2025
@rpenido rpenido force-pushed the rpenido/fal-4112/disallow-edits-to-units-in-courses-from-libraries branch 10 times, most recently from 756dcaf to 49290ad Compare April 23, 2025 22:51
Copy link
Contributor

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

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

@rpenido I had to fix a few things on the Course Outline page, and made sure that we're only disallowing edits on Units sourced from a library (lct:...).

Also -- we still need to be able to publish Units sourced from a library, we just can't edit them.

But this is working enough for now :)

TODO in a follow-up PR:

  • If the upstream link is broken, allow edits.

👍

  • I tested this using the PR test instructions on : units sourced from a library are read only, units copy/pasted from a course are editable, normal units are editable.
  • I read through the code
  • I checked for accessibility issues by using my keyboard to navigate
  • Includes documentation -- code docs
  • User-facing strings are extracted for translation

Copy link
Contributor

@ChrisChV ChrisChV left a comment

Choose a reason for hiding this comment

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

Looks good!

@bradenmacdonald bradenmacdonald force-pushed the rpenido/fal-4112/disallow-edits-to-units-in-courses-from-libraries branch from ebd8674 to 1ff27c5 Compare April 24, 2025 19:10
@bradenmacdonald bradenmacdonald enabled auto-merge (squash) April 24, 2025 19:18
@bradenmacdonald bradenmacdonald merged commit 9824502 into openedx:master Apr 24, 2025
7 checks passed
@github-project-automation github-project-automation bot moved this from Waiting on Author to Done in Contributions Apr 24, 2025
@bradenmacdonald bradenmacdonald deleted the rpenido/fal-4112/disallow-edits-to-units-in-courses-from-libraries branch April 24, 2025 19:20
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

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants