Commit Graph

67229 Commits

Author SHA1 Message Date
Tarun Tak
93fb3c4231 feat: update @edx/brand dependency to @edx/brand-edx.org (#37236)
Co-authored-by: root <root@lms.devstack.edx>
2025-08-19 14:33:47 +05:00
Tarun Tak
077e4ee4af chore: update @edx/brand dependency to new package @openedx/brand-openedx (#37105)
* chore: update @edx/brand dependency to new package @openedx/brand-openedx

* Revert package-lock.json

* fix: updated package-lock.json
2025-08-19 09:35:37 +05:00
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
Pandi Ganesh
bc76a865f4 fix: update role assignment conditions (#37188) 2025-08-18 16:12:02 +05:00
github-actions[bot]
226ad8e5b7 feat: Upgrade Python dependency edx-enterprise (#37218)
* feat: Upgrade Python dependency edx-enterprise

Logged response received from XAPI in logs to debug the XAPI transmission issues.

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

* fix: Trgger GitHub Actions

---------

Co-authored-by: zamanafzal <11922730+zamanafzal@users.noreply.github.com>
Co-authored-by: zamanafzal <zamanafzal@gmail.com>
2025-08-18 15:35:52 +05:00
Irtaza Akram
35adeafafd fix: Allow tests for Extracted & Builtin Annotatable XBlock (#36246)
Test Annotatable XBlock in both built-in and extracted modes to keep them in sync.

Related to: https://github.com/openedx/edx-platform/issues/34841
2025-08-15 11:44:04 -04:00
Irtaza Akram
bbfdce0f9a fix: Allow tests for Extracted & Builtin HTML XBlock (#36399)
Test HTML XBlock in both built-in and extracted modes to keep them in sync.

Related to: https://github.com/openedx/edx-platform/issues/36283
2025-08-15 11:42:30 -04:00
Serhiii Nanai
55a3757107 feat: Extend MFE Config API for frontend-app-catalog [FC-0086] (#37130)
* feat: return response merged from base config, mfe config and mfe overrides

* test: adjust existing tests

* test: add new test methods

* fix: add blank line

* fix: remove homepage_overlay_html

* fix: typo in a comment

* test: change dict merge order to follow the correct hierarchy

* fix: change response keys to uppercase

* fix: add enable_course_discovery

* fix: change COURSES_ARE_BROWSABLE to NON_BROWSABLE_COURSES

* fix: remove show_homepage_promo_video

* fix: use None as default for promo video youtube id

* docs: expand docstrings, rename method/variables

* fix: remove is_cosmetic_price_enabled field
2025-08-15 09:15:40 -04: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
Feanil Patel
bff6404d0f Merge pull request #37176 from openedx/feanil/unpin_fs_s3fs
feanil/unpin fs s3fs
2025-08-14 12:56:12 -04: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
Feanil Patel
7f1dbc2c27 chore: Run make upgrade 2025-08-14 08:56:48 -04:00
Feanil Patel
74d6a543bf fix: Don't pin fs-s3fs in kernel.index
It's unclear why this is pinned here in the first place.  The only
changes since this version that the fs-s3fs package has had is that the
API has become stable and the underlying dependencies have been upgraded
to newer versions.
2025-08-14 08:56:48 -04:00
Muhammad Sameer Amin
4d8e0556e1 Merge pull request #37204 from openedx/sameeramin/upgrade-enterprise-integrated-channels-2a53e2e
feat: Upgrade Python dependency enterprise-integrated-channels
2025-08-14 13:25:42 +05:00
Mubbshar Anwar
ee8b19442d fix: Remove assertQuerysetEqual (#37200)
replace assertQuerysetEqual with assertEqual dut to deprecation in Django 5.2
2025-08-13 22:24:08 +05:00
M. Sumair Khokhar
eb66c5d88b fix: test failure in test_all_languages (#37201)
* fix: test failure in test_all_languages
2025-08-13 22:18:41 +05:00
sameeramin
ca615e68f7 feat: Upgrade Python dependency enterprise-integrated-channels
Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2025-08-13 17:01:10 +00:00
Feanil Patel
2a53e2e561 Merge pull request #37165 from openedx/feanil/remove_unnecessary_pin
feanil/remove unnecessary pin
2025-08-13 08:57:57 -04:00
Mubbshar Anwar
b52e72f6e0 fix: fix timezone utc for 52 (#37199)
The django.utils.timezone.utc is removed in Django 5.1.

issue: 37151
2025-08-13 17:46:17 +05:00
Awais Qureshi
4a466b9da9 fix: Fix signal test failures in Django 5.2. (#37193) 2025-08-13 14:12:38 +05:00
Irtaza Akram
5a7bae6265 chore: bump xblocks-contrib to 0.6.0 (#37196) 2025-08-13 12:54:18 +05:00
Hassan Raza
9a8dc51535 chore: Handle forbidden username exceptions on registration (#37185) 2025-08-13 12:34:11 +05:00
Feanil Patel
bf62862b9f test: Fix notifacitons test for new DRF version.
DRF was swallowing an underlying error string and providing its own
which was being checked for here.

See https://github.com/encode/django-rest-framework/pull/8051 for
details.

The new version fixes that underlying issue and so the test failed.

Rather than checking for the exact string of the 404 which is not
relevant, we now just verify that the error code associated with the
request matches the HTTP response. This should make the test more
resilient to future text changes in the underlying Django function
`get_object_or_404`
2025-08-12 16:08:29 -04:00
Feanil Patel
e3e9dd8534 Merge pull request #37191 from openedx/feanil/fix_debug_toolbar
fix: Pin to an older version of the debug toolbar.
2025-08-12 15:41:39 -04:00
Feanil Patel
7121d4e466 fix: Correct serializer model reference.
When linking a DRF serializer with a model, you need to link it to the
model class not an instance of the model.

The newer version of DRF tries to access the model_manager from the
model here and runs into issues if it's not defined correctly.
2025-08-12 13:59:40 -04:00
Feanil Patel
b370064978 test: Reduce query count.
Previously we were doing the following query:

SELECT 1 AS "a" FROM "user_api_userpreference" WHERE ("user_api_userpreference"."key" = 'pref-lang' AND "user_api_userpreference"."user_id" = 1 AND NOT ("user_api_userpreference"."id" = 1)) LIMIT 1

Looking at the middleware, I don't see why this was previously
happening.
2025-08-12 12:22:05 -04:00
Feanil Patel
2edd656492 chore: Run make upgrade 2025-08-12 11:26:59 -04:00
Feanil Patel
bcd900ef23 build: urllib3 is only a testing direct requirement.
It's only used by botocore and requests in the actual retirement code
and those have been able to handle a newer version of the library for
quite some time.

urllib3 is directly used in the testing code but not in a way where we
need to constrain it from being upgraded.
2025-08-12 11:26:59 -04:00
Feanil Patel
4d7c8a3a3a build: Unpin DRF.
There have been no breaking changes in the minor versions and there is
no ticket for unpinning this constraint. It doesn't make sense to keep.
2025-08-12 11:26:59 -04:00
Feanil Patel
244da33dbf fix: Pin to an older version of the debug toolbar.
The latest version is causing errors when trying to serialize some
binary data into text.
2025-08-12 11:17:44 -04:00
Krish Tyagi
14cdbc855d fix: SAML provider config references to use current SAML configuration versions (#36954)
Introduces temporary rollout toggle ENABLE_SAML_CONFIG_SIGNAL_HANDLERS
which controls whether SAML configuration signal handlers are active.
When enabled (True), signal handlers will automatically update SAMLProviderConfig
references when the associated SAMLConfiguration is updated.
When disabled (False), SAMLProviderConfigs point to outdated SAMLConfiguration.

Warning: Disabling this toggle may result in SAMLProviderConfig instances
pointing to outdated SAMLConfiguration records.

Use the management command 'saml --fix-references' to fix outdated references.
2025-08-12 09:34:34 -04: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
edX requirements bot
218030cfef chore: Upgrade Python requirements (#37179) 2025-08-12 07:57:10 -04:00
Usama Sadiq
612d5c1ee2 fix: fix pylint quality warnings (#37187) 2025-08-12 16:56:49 +05:00
Muhammad Adeel Tajamul
e8b58f770e feat: updated one click unsubscribe to use account level preference model (#37161) 2025-08-12 16:44:42 +05:00
salmannawaz
983cdf9274 Test PR | Enable Extracted Poll XBlock (#36566)
* chore: poll xblock extracted code enable PR
2025-08-12 16:17:10 +05:00
github-actions[bot]
1433cad564 feat: Upgrade Python dependency edx-enterprise (#37167)
fix: Added response received from XAPI in logs to debug the XAPI transmission issues.

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

Co-authored-by: zamanafzal <11922730+zamanafzal@users.noreply.github.com>
Co-authored-by: Zaman Afzal <zamanafzal@gmail.com>
2025-08-12 14:12:25 +05:00
Mubbshar Anwar
a41a413983 chore: Remove assertQuerysetEqual (#37182)
replace assertQuerysetEqual with assertEqual dut to deprecation in Django 5.2
2025-08-12 11:14:16 +05:00
Robert Raposa
1c0fb8dbb8 fix: constrain pip-tools<7.5.0 to fix lxml[html_clean] issue (#37174)
See https://github.com/openedx/edx-platform/issues/37168
for more details.
2025-08-11 13:40:55 -04:00
Feanil Patel
e12caeaeeb Merge pull request #37153 from openedx/repo-tools/upgrade-python-requirements-7c2acdc
chore: Upgrade Python requirements
2025-08-11 10:14:45 -04:00
Awais Qureshi
421da0a947 fix: Correctly handle Django lazy translation objects. (#37155) 2025-08-11 10:03:46 -04:00
github-actions[bot]
910c9e6ae2 feat: Upgrade Python dependency edx-enterprise (#37164)
Bump edx-enterprise to 6.2.16 for requirements upgrade.

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

Co-authored-by: brobro10000 <82611798+brobro10000@users.noreply.github.com>
2025-08-11 09:31:14 -04:00
edX requirements bot
11fa84ce7b chore: Upgrade Python requirements 2025-08-08 15:59:11 -04:00
Feanil Patel
7c2acdca84 Merge pull request #37083 from openedx/repo_checks/ensure_workflows
Update standard workflow files.
2025-08-08 12:01:24 -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
Muhammad Farhan Khan
4a9fc77ecb test: Allow for Extracted Word Cloud Block | Fix Test Cases (#35983)
Run tests for both the built-in and extracted WordCloud block.
The tests are mostly compatible with both versions of the block,
except for a few places where the XBlock framework and the
built-in XModule system differ which we've had to handle using
conditionals.

This moves us closer to enabling the extracted WordCloud block
by default and eventually removing the built-in block.

Part of: https://github.com/openedx/edx-platform/issues/34840
2025-08-08 11:22:26 -04:00
Irtaza Akram
17f0e256bd chore: bump xblocks-contrib version (#37149) 2025-08-08 15:56:53 +05:00
github-actions[bot]
d08b11bbb0 feat: Upgrade Python dependency edx-enterprise (#37147)
fix: Added more logs to debug the XAPI transmission issues.

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

Co-authored-by: zamanafzal <11922730+zamanafzal@users.noreply.github.com>
Co-authored-by: Zaman Afzal <zamanafzal@gmail.com>
2025-08-08 14:46:20 +05:00
Devasia Joseph
d3eba7a097 fix: refactor API response to handle empty data 2025-08-08 14:04:26 +05:00