Commit Graph

67242 Commits

Author SHA1 Message Date
Vivek
2e141b4ef2 feat: Add DOI-specific headers for link validation (#37246) 2025-08-22 06:01:45 +00:00
Tarun Tak
6f13c1e1cd fix!: session ID stability while maintaining inactivity timeout (#36896)
This change modifies the SessionInactivityTimeout middleware to prevent
the session ID from changing on every request while still enforcing the
inactivity timeout.

Key improvements:
- Store datetime values as ISO strings for proper serialization
- Implement hybrid session save approach that only allows full session
  saves periodically (controlled by SESSION_SAVE_FREQUENCY_SECONDS)
- Preserve session ID between requests while still tracking user activity

This resolves the issue where lms_sessionid was changing on every user
interaction, which caused problems.

BREAKING CHANGE: The breaking change is that SESSION_ACTIVITY_SAVE_DELAY_SECONDS was introduced with a 15 minute default, which will change the current behavior. It is not necessarily breaking (since it actually fixes an issue), but this is to bring more attention to the new setting because the default is reasonable, but also somewhat arbitrary.
2025-08-21 23:15:12 -04: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
Paulo Viadanna
d132efa08d feat: add a POST endpoint for listing courses (#35586)
* feat: add a POST endpoint for listing courses
2025-08-21 23:26:18 +05:30
kshitij.sobti
0fbfc1cf54 feat: Use dropdown for units when more then 15
When dealing with subsections that have a lot of units, show a dropdown for
unit selection to simplify navigation.
2025-08-21 17:42:02 +05:30
Agrendalath
bbc0cc2baa fix: show correct icons in the sidebar for units with custom XBlocks
Currently, the sidebar relies only on the XBlock's `category` class attribute
(called `type` in the transformers). This behavior is inconsistent with the
legacy subsection navigation, which relies on the `XModuleMixin.get_icon_class`
method. This commit adds the `icon_class` to the fields collected by the
transformers and uses it to determine whether the "problem" or "video" icon
should be displayed for a unit in the sidebar.
2025-08-21 00:29:01 +05:30
Agrendalath
64190d1e13 fix: sidebar completion for completable XBlocks with children
It is possible to create a completable XBlock with children.
An example is the Library Content Block with the
`MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW` feature toggle.
The sidebar should use the same mechanism as the `BlockCompletionTransformer`
and the `edx-completion` library. It means that we should treat:
1. An aggregator XBlock as completed only when all its children are completed.
2. A completable XBlock as completed when it is directly marked as completed
   (without checking the completion of its children).
2025-08-20 17:52:35 +05:30
Awais Qureshi
98f4756d09 fix: Passing unsaved model instances to related filters is no longer … (#37227)
* fix: Passing unsaved model instances to related filters is no longer allowed.
2025-08-20 11:16:20 +05:00
Ehtesham Alam
cb80118ebf fix: remove CSRF_TRUSTED_ORIGINS_WITH_SCHEME variable (#37195) 2025-08-20 11:12:44 +05:00
Muhammad Adeel Tajamul
0c47ddf354 feat: removed spaces check for spam urls (#37238) 2025-08-20 05:54:06 +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
Usama Sadiq
be438f1554 fix: pylint warning arguments-differ (#37234) 2025-08-19 15:24:15 +05:00
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