Commit Graph

10748 Commits

Author SHA1 Message Date
Chris Chávez
51bfd3febe feat: Add blockType to xblockPreview & title to xblock_iframe [FC-0097] (#37362)
- Adds `blockType` and `is_modified` to the `showXBlockLibraryChangesPreview` iframe message.
- Add title to the `xblock_iframe`
- Add `is-modified` to `studio_xblock_wrapper`
- Add `disable_staff_debug_info` as a query param in `render_xblock`
- `downstream_is_modified` added to ComponentLink and ContainerLink
2025-09-29 23:27:32 +00:00
Feanil Patel
d34a6b9c6f Merge pull request #37342 from raccoongang/nanai/axm-2166/update-link-generation
feat [FC-86]: update course_about & catalog link generation
2025-09-29 15:28:41 -04:00
Serhii Nanai
b448b0fe69 fix: look up ENABLE_CATALOG_MICROFRONTEND in settings directly, adjust tests 2025-09-29 14:16:46 +03:00
Vivek
86aaf2f4cc fix: update Course Highlights help URL (#37388) 2025-09-26 12:52:41 +05:00
Navin Karkera
dfe9cb8380 feat: updates legacy libraries list API to include migration info [FC-0097] (#37286)
Adds migration info like `migrated_to_title`, `migrated_to_key` and `is_migrated` fields indicating whether the legacy library was migrated to library v2. If yes, it includes the new library name and key.

Users can also filter by migration status using `is_migrated` query param.
2025-09-25 10:46:52 -05:00
Kyle McCormick
7275ce1634 feat!: modulestore_migrator (#36873)
This introduces the modulestore_migrator app, which can be
used to copy content (courses and libraries) from modulestore
into Learning Core. It is currently aimed to work on the legacy
library -> v2 library migration, but it will be used in the future
for course->library and course->course migrations.

This includes an initial REST API, Django admin interface,
and Python API.

Closes: https://github.com/openedx/edx-platform/issues/37211

Requires some follow-up work before this is production-ready:
https://github.com/openedx/edx-platform/issues/37259

Co-authored-by: Andrii <andrii.hantkovskyi@raccoongang.com>
Co-authored-by: Maksim Sokolskiy <maksim.sokolskiy@raccoongang.com>
2025-09-24 11:02:05 -04:00
Navin Karkera
5d9fc2442f refactor: course container children api [FC-0097] (#37375)
* feat: course container children view

* refactor: rename

* refactor: include children info in upstream info of container children

* fix: tests

* fix: test

* refactor: children check
2025-09-24 11:27:31 +05:30
Serhii Nanai
1c1fa1b1a1 refactor: switch to global mfe state check 2025-09-23 20:45:07 +03:00
Serhii Nanai
f018cfe70e feat: update course_about & catalog link generation 2025-09-23 20:45:01 +03:00
Devasia Joseph
ed6aea3aa7 fix: Inconsistent update state in Course Optimizer API (#37369)
* fix: Inconsistent update state in Course Optimizer API

* fix: update re-run link issue
2025-09-23 17:54:11 +05:00
Taylor Payne
c3bc32399f chore: remove outdated JWT auth related settings 2025-09-19 15:18:54 -06:00
Taylor Payne
bf5a399380 Consolidate common settings to platform wide settings module (#37337)
* refactor: lift same settings up to openedx common module
2025-09-19 09:00:02 -04:00
Feanil Patel
36e458d957 fix: Use CI oriented FakeWebpackLoader
This was added in a newer version of django-webpack loader to be used in
CI.  Previously we had some monkey patches to deal with this but they
could break when changes happen to the upstream django-webpack-loader
library.

This should be a more robust solution to keep CI working and to reduce
complexity on future upgrades.
2025-09-18 10:42:26 -04:00
Feanil Patel
25a90fcbb5 test: Fix test monkeypatches for render_bundle
Now that the signature has changed, update the testing monkeypatches as well.
2025-09-18 10:42:26 -04:00
Feanil Patel
f120a7cac5 Merge pull request #37067 from WGU-Open-edX/collapse-features-dictionary
refactor: flatten FEATURES dictionary with backward compatible proxy
2025-09-18 10:39:48 -04:00
Navin Karkera
a11086ffac feat: allow editing imported text blocks (#37124)
* feat: allow editing html block imported from upstream

The modified field is left untouched in future sync while storing the
upstream values in hidden fields to allow authors to revert to upstream
version at any point.

* fix: sync downstream_customized field for copy-pasted modified block

* test: add more tests

* fix: lint issues

* test: copy paste

* feat: skip sync if html data is modified

* feat: update upstream fields only when modified

* refactor: use version_synced field to skip sync

* feat: edit title inplace for library source components

* fixup! feat: edit title inplace for library source components

* fix: edit title button style

* fix: test case

* fix: lint issue

* refactor: don't show different icon for modified upstream blocks

* Revert "refactor: use version_synced field to skip sync"

This reverts commit 8b784fff2f49b43702c952e7f955bd4048e8cc69.

* feat: only skip sync for modified blocks if updated as part of container

* refactor: update sync behaviour when synced individually and as part of parent

* feat: include ready to sync children info in downstream link get api

* test: fix failing tests

* fix: lint issues

* feat: new tests and update api to allow overriding modified fields in sync

* test: api changes

* refactor: edit options should be visible for individual imports

* docs: update api docs

* chore: remove old comments
2025-09-17 14:50:24 +05:30
coder1918
790a67a0d1 refactor: flatten FEATURES dictionary with backward compatible proxy 2025-09-09 14:11:39 -06:00
Rômulo Penido
693680ba58 fix: unlink broken link (#37329)
This fixes a bug that occurs when unlinking a block from a downstream block that has a broken link
2025-09-08 17:10:47 +00:00
Ram Chandra Bhavirisetty
42afa1bb62 chore: remove deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings (#37002) 2025-09-05 17:52:33 -04:00
Devasia Joseph
acbf50a7dd feat: add custom attributes to moniter export course task (#37314) 2025-09-03 10:13:21 +05:00
Kyle McCormick
7ef575ed2d feat!: Drop import_from_modulestore app (3/3 -- uninstall app) (#37241)
https://github.com/openedx/edx-platform/issues/37242
2025-09-02 14:05:16 +00:00
Devasia Joseph
a9bd29ea6e feat: enhance Course Optimizer to update previous course links via API (#37206)
* feat: API to update previous-run course links

* feat: handle edge cases and update tests for prev-run links API
2025-09-01 19:28:40 +05:00
Deborah Kaplan
a4d4ddf9e3 chore: removing ENABLE_V2_CERT_DISPLAY_SETTINGS (#37302)
the remnants of the logic that used this setting has been gone for a long time.
This removes the toggle.

FIXES: APER-1405
2025-08-29 16:09:02 -04:00
Navin Karkera
eb5ba0f87d fix: exception while trying to check sync status of deleted upstream (#37298)
Use `Upstream.try_get_for_block` instead of `Upstream.get_for_block` which raises `BadUpstream` if upstream block is deleted.
2025-08-28 17:43:06 +00:00
Rômulo Penido
8085bf6be4 feat: Add unlinkable to xblock actions and update top_level_parent_key on unlink [FC-0097] (#37215)
- Adds the `unlinkable` action to the XBlock object sent to the frontend
- Updates the `top_level_parent_key` reference when unlinking containers. If you unlink a Section with Subsections and Units, this updates the `top_level_parent_key` for the Subsections to `None` (they are the top level now), and the `top_level_parent_key` for the Units to the corresponding parent Subsection.
2025-08-28 16:30:17 +00:00
Kyle McCormick
a86d29f155 feat!: Drop import_from_modulestore app (2/3 -- models) (#37240)
Part of: https://github.com/openedx/edx-platform/issues/37242
2025-08-28 08:43:54 -04:00
Feanil Patel
109f5e036b Merge pull request #37269 from openedx/feanil/remove_unnecssary_toggle
feat: Remove the `SEND_CATALOG_INFO_SIGNAL` toggle
2025-08-26 15:39:21 -04:00
Feanil Patel
47efb29071 feat: Remove the SEND_CATALOG_INFO_SIGNAL
This setting controls an additive feature to send a signal on catalog
changes.  The signal is documented as a part of the list of supported
events in our openedx-events reference. It has also been running live in
the edx.org deployment for some time.

This change removes the signal and defaults to the behavior as if it is
net to true.

OPERATORS NOTE: If you override the `SEND_CATALOG_INFO_SIGNAL` in your
settings overrides for the edx-platform, you can remove that override.
This signal will always fire on catalog changes now.  The performance
impact of this change should be negligible.
2025-08-26 14:45:10 -04:00
Kyle McCormick
c5f0f09d79 feat!: Drop import_from_modulestore app (1/3 -- code only) (#37239)
Part of: https://github.com/openedx/edx-platform/issues/37242
2025-08-25 11:01:36 -04:00
Vivek
2e141b4ef2 feat: Add DOI-specific headers for link validation (#37246) 2025-08-22 06:01:45 +00:00
Chris Chávez
fa3dcc5482 feat: Add the top-level parent logic to the ready_to_sync value in the UpstreamLink (#37217)
- Updates `UpstreamLink.ready_to_sync` with the top-level parent logic: In a container, `ready_to_sync` is `True` if the container or any children have changes.
- Updates `decline_sync` to decline children recursively.
2025-08-21 16:34:58 -05:00
Navin Karkera
617b6447cc feat: reindex course and recreate upstream links post import and course re-run (#37237)
Index the newly created course after import and course re-run. Also recreate upstream links after course re-run.

We make use of newly created COURSE_RERUN_COMPLETED signal to run post re-run processes.
2025-08-21 18:15:55 +00:00
Ehtesham Alam
cb80118ebf fix: remove CSRF_TRUSTED_ORIGINS_WITH_SCHEME variable (#37195) 2025-08-20 11:12:44 +05:00
Sara Burns
405282c17e feat!: Make MFE scroll content instead of iFrame when scrollToXblock is called 2025-08-20 01:32:14 +05:30
Chris Chávez
af01129316 feat: API to retrieve library block/container hierarchy (#36813)
* test: Test for publish section/subsection

* test: published_by is now None for unpublished containers

* test: adds TODO comments to the tests

in anticipation of publishing container children

* feat: adds api to retrieve library block/container hierarchy

* test: adds query counts for hierarchy API tests

These are really high, but highlight the need for future optimizations.

* perf: reduce hierarchy API query counts

* perf: cut query counts in half

Required a refactor of the approach to avoid using the Metadata classes.

* chore: trigger ci

* chore: update openedx-learning constraint

* chore: compile requirements

* test: updating query count

* style: Add missing comment in kernel.in

* fix: get_container_from_key param and comments

* docs: mark api as UNSTABLE and add comment about get_library_object_hierarchy implementation

---------

Co-authored-by: Jillian Vogel <jill@opencraft.com>
Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
2025-08-18 18:15:47 -07:00
Chris Chávez
a1195efc20 refactor: Refactor upstream links summary to add the top-level parent logic [FC-0097] (#37208)
- Refactor upstream links summary to add the top-level parent logic
- Update the `filter_links` function to annotate each result with `ready_to_sync_from_children`
2025-08-19 00:01:53 +00:00
Chris Chávez
ec72dc7998 feat: Add top-level parent logic to Upstream/Dowstream links [FC-0097] (#37076)
- Adds the `top_level_parent_usage_key` to the `EntityLinkBase`
- This field is used to save the top-level parent of a component or container when it is imported into a course. Example: A unit with components imported into a course. The unit is the top-level parent of the components.
- Updates the `DownstreamListView` to return the top-level parents instead of downstream child, if this parent exists.
- Each time containers with children were synchronized, a new downstream block was created for each child instead of updating the existing one. This occurred because the `upstream_key` was incorrectly validated as an `Opaquekey` against a list of key strings. This was fixed by converting the `upstream_key` to a string before the verification. (see 34cd5a4781 and 29647831dc)
- Which edX user roles will this change impact?  "Course Author", "Developer".
2025-08-14 17:36:30 +00:00
Rômulo Penido
1a9f6e15a5 feat: copy/paste containers (units/subsections/sections) in Studio (#37008)
* feat: copy endpoint for Library Containers

* fix: make source_usage_key optional and removing upstram info for xblock olx

* test: add tests

* refactor: remove unecessary changes to reduce diff

* fix: change assert

* feat: add `write_upstream` field to ContainerSerializer

* fix: remove comment

* refactor: change `source_usage_key` type and more

* fix: try to infer the source version

* fix: InvalidKeyError while copying container with assets

* fix: read source_version from OLX

* fix: remove store check

* fix: change ident

Co-authored-by: Braden MacDonald <mail@bradenm.com>

* feat: fill source_version and make get_component_version_from_block public

* refactor: rename `source_key` to `copied_from_block`

* test: add test to `write_copied_from=false`

* fix: removing unused fallback elif

* fix: remove `copied_from_block` param

---------

Co-authored-by: Braden MacDonald <mail@bradenm.com>
2025-08-14 08:06:35 -07:00
Irtaza Akram
472801b774 fix: add resourcetemplate to xblock_mixins (#37184)
Add ResourceTemplates to XBLOCK_MIXINS so it’s applied to all CMS XBlocks at
runtime instead of being directly inherited. This keeps the Studio-only feature
in edx-platform (where it belongs), while still making it available to built-in
and extracted XBlocks.

When we extract built-in blocks from the platform, they will not be able to
inherit ResourcesTemplates directly; they will get it from XBLOCK_MIXINS. So,
we also needed to update a few template-related tests to use the mixed block
class (or an instance of it) rather than the unmixed base class, because the
unmixed base classes will soon be extracted and thus lack ResourceTemplates.

Related to https://github.com/openedx/edx-platform/issues/34827
2025-08-12 09:04:34 -04:00
Taylor Payne
325a0c116a fix: update mock config to include scheme for csrf domains (#37120)
Since the scheme must be included for the CSRF_TRUSTED_ORIGINS setting since
Django 4.0, this changes the values in the mock.yml configuration files to use
the scheme for the values under CSRF_TRUSTED_ORIGINS. We match the values
defined under CSRF_TRUSTED_ORIGINS_WITH_SCHEME key.

lms/envs/production.py pulls from CSRF_TRUSTED_ORIGINS_WITH_SCHEME in the YAML
config to set the CSRF_TRUSTED_ORIGINS setting , but cms/envs/production.py
pulls from CSRF_TRUSTED_ORIGINS in the YAML. So, this change fixes the CMS when
run with mock.yml.
2025-08-08 11:31:04 -04:00
Devasia Joseph
d3eba7a097 fix: refactor API response to handle empty data 2025-08-08 14:04:26 +05:00
Devasia Joseph
c6048fcd68 fix: added exception handling for links descriptor generator function 2025-08-08 14:04:26 +05:00
Devasia Joseph
e2ce7debf2 fix: refactor code based on pep-8 guideline 2025-08-08 14:04:26 +05:00
Devasia Joseph
ca45009a31 fix: apply linting rules and refactor code 2025-08-08 14:04:26 +05:00
Devasia Joseph
466aaad85d feat: Enhance course optimizer to detect previous run links and expand scanning scope 2025-08-08 14:04:26 +05:00
Daniel Wong
f114399e12 fix: update resolve_storage_backend function and fix tests 2025-08-06 13:25:10 -06:00
Muhammad Faraz Maqsood
64a557d00f fix: course detail page error (#37132)
rest_framework.fields.BuiltinSignatureError: Field source for `InstructorInfoSerializer.title` maps to a built-in function type and is invalid. Define a property or method on the `str` instance that wraps the call to the built-in function.

Co-authored-by: Muhammad Faraz  Maqsood <faraz.maqsood@A006-01130.local>
2025-08-06 12:58:03 -04:00
Feanil Patel
dc23ed7a31 Merge pull request #37047 from mubbsharanwar/mubbshar/issue-37032
refactor: convert function based view to class based
2025-08-05 16:08:56 -04:00
Devasia Joseph
aae3f62555 fix: Update vertical block test to use dynamic course id 2025-08-05 14:20:52 +05:00
Taylor Payne
16d96565e3 refactor: move production defaults to common modules (#37045)
In the effort to simplify settings in edx-platform, as discussed in ADR 22 -
Settings Simplification, this PR brings some of the production defaults defined
in `lms/envs/production.py` and `cms/envs/production.py` up to
`openedx/envs/common.py` or `lms/envs/common.py` and `cms/envs/common.py` as
appropriate.

Bringing these defaults up from the `production.py` settings modules caused
changes in the rendered settings of the `test.py` modules, and so I have
settings to the `test.py` modules to bring the rendered settings back in line
with what is has been. I have not deeply looked at which settings are needed
for tests to pass or not, but just the differences between the rendered
settings between `master` and this branch.

ADR 22: https://github.com/openedx/edx-platform/blob/master/docs/decisions/0022-settings-simplification.rst
Fixes https://github.com/openedx/edx-platform/issues/36892.
2025-08-04 17:06:16 -04:00