Commit Graph

10728 Commits

Author SHA1 Message Date
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
Navin Karkera
103a152c36 feat: disallow adding children to containers imported from library (#37088)
Updates `childAddable` action in xblocks that have upstream link to stop users from updating imported sections and subsections.
2025-08-04 06:05:12 +00:00
mubbsharanwar
95db5fb28d fix: remove redundant code 2025-08-01 18:46:58 +05:00
Ishan Masdekar
c9886882e3 feat: include the usage_key in API to get ancestor blocks (#37072)
- includes location along with the child ancestor block as it is
required in the frontend authoring app for unit scrolling purpose in the
breadcrumbs.

Required for https://github.com/openedx/frontend-app-authoring/issues/1924
2025-07-31 14:22:38 -07:00
Mubbshar Anwar
6d150acf81 refactor: Remove HIBP settings from CMS (#36998)
Remove HIBP settings from CMS common settings module
2025-07-31 09:43:36 -04:00
mubbsharanwar
54164a918c refactor: convert function based view to class based 2025-07-31 15:40:42 +05:00
Chris Chávez
faad8bf020 feat: New DownstreamListView to get all components and container links [FC-0097] (#37024)
There are two different views and entry points for components and containers, which have the same logic and filters. In this PR, a single view has been created that allows you to get all links or filter them by component or container.

* Rename `DownstreamComponentsListView` and mark it as deprecated.
* Mark `DownstreamContainerListView` as deprecated.
* Update `DownstreamSummaryView` to support container on the summary.
* Add `show` param in `get_course_outline_url`
2025-07-24 19:11:18 +00:00
Hunzlah Malik
89190cc55a Certificate activation handler to drf (#37037)
* feat: certificate_activation_handler to drf
2025-07-24 10:08:43 -04:00
Navin Karkera
5409baa5f8 feat: include upstream_info for all xblocks including sections and subsections (#37041) 2025-07-23 17:54:13 +00:00
Kyle McCormick
a7eb261330 feat!: Remove unused Django settings files
BREAKING CHANGE: This removes all Django settings files
except {lms,cms}/envs/{production,devstack,test}.py.
Operators using any other edx-platform Django settings
files should move to {lms,cms}/envs/production.py, or
they should copy the settings file they need out of edx-platform
and into their own configuration sources.

Part of: https://github.com/openedx/edx-platform/issues/36905
2025-07-22 10:27:50 -04:00
Rômulo Penido
e1a801a700 feat: link section/subsection to course
Allows adding and syncing containers from libraries into courses
2025-07-21 15:35:51 -05:00
Ivan Niedielnitsev
7e8d8888f2 fix: sort Advanced components alphabetically by display name (#36767)
adding sorting of Advanced components in the studio by display name
2025-07-21 11:28:54 -05:00
Taylor Payne
36327ff27c refactor: import constants into platform-wide settings module 2025-07-21 08:08:34 -04:00
Taylor Payne
a98dd3f748 refactor: move explicitly shared settings into new common module 2025-07-21 08:08:34 -04:00
Bryann Valderrama
a807d0e280 chore: add missing inline code annotations in events (#36473) 2025-07-18 17:55:54 +02:00
Pandi Ganesh
22167dd88b fix: add generic headers to link-checker to prevent false broken link reports (#37031) 2025-07-17 16:17:51 +05:30
Devasia Joseph
91006ec314 feat: add CMS base domain to enable session-based API access (#37014) 2025-07-17 10:41:10 +05:30
Pandi Ganesh
46055338ae fix: strip whitespace from URL causing broken link on Course Optimizer page (#37020) 2025-07-15 17:08:02 +05:30
Asad Ali
51c34d05a9 fix: link reruns & clones to correct orgs 2025-07-14 14:31:30 +05:00
Devasia Joseph
b665f30378 fix: fixed lint errors 2025-07-10 17:37:25 +05:30
Devasia Joseph
f330e49aaf feat: Added disable/enable discussion endpoint to swagger 2025-07-10 17:05:42 +05:30