Commit Graph

10673 Commits

Author SHA1 Message Date
Navin Karkera
bc102d8db6 Merge pull request #36955 from openedx/mfrank/add-oel-publishing-dep-contentstore-migration-0010
fix: add oel-publishing migration dependency to contentstore
2025-06-27 12:03:51 +02:00
Maxwell Frank
fc84ff39d6 fix: add oel-publishing migration dependency to contentstore 0010 2025-06-26 18:03:25 +00:00
pganesh-apphelix
f3053de6b7 chore: remove ensure csrf cookie decorator from discussion api 2025-06-26 10:32:16 +05:00
Krish Tyagi
3895044c72 fix!: Remove deprecated CookieNameChange middleware (#36815)
The CookieNameChange middleware has been removed. Originally a temporary
measure slated for removal by October 1, 2021, it facilitated a transitional cookie
migration pattern that is no longer required. 

This action addresses DEPR: 
https://github.com/openedx/edx-platform/issues/36834
2025-06-25 19:38:43 -04:00
Tim McCormack
fb6eaf5141 docs: Document how STATIC_URL_BASE is used (#36952) 2025-06-25 18:09:10 -04:00
Navin Karkera
2c2721436d feat: container links api (#36911)
Adds list api to fetch container library links information. S
2025-06-24 17:20:53 +00:00
Feanil Patel
3a3b3faadb Merge pull request #36846 from raccoongang/rg/axm-course-catalog-add-org-image-url-indexing
feat: [FC-86] add org_image_url to course_discovery index FC-86
2025-06-23 14:13:27 -04:00
Andrii
04febf0761 refactor: change logo_path to logo_url 2025-06-23 19:12:26 +03:00
Awais Qureshi
5118c0bc3e test: fixing get_storage_class deprecated method in tests. (#36939) 2025-06-23 10:06:03 -04:00
Feanil Patel
009dd30c69 Merge pull request #36849 from dwong2708/dw/upgrade-django-5-course-import
feat: removing get_storage_class from COURSE_IMPORT_STORAGE
2025-06-20 14:36:37 -04:00
Feanil Patel
1efee3498a Merge pull request #36794 from dwong2708/dw/certificates-enabled-fix
fix: certificates_enabled flag now correctly returns its boolean value
2025-06-20 14:35:53 -04:00
Daniel Wong
e0a0d01d26 feat: update file storage access to support Django 5.0 storages registry 2025-06-20 09:07:29 -06:00
Feanil Patel
ba0f3bdaa3 Merge pull request #36761 from dwong2708/dwong/updgrade-django-5-get-storages
feat: removing get_storage_class from COURSE_METADATA_EXPORT_STORAGE
2025-06-20 09:54:24 -04:00
Andrii
50fdf8446f refactor: use default logo as placehodler for organization 2025-06-19 16:24:02 +03:00
Muhammad Faraz Maqsood
b2c9dddb84 feat: get language from request user's preferences and sort according to it 2025-06-19 14:43:31 +05:00
Andrii
66c03afdb2 refactor: change placeholder variable_name + url and add placeholder image 2025-06-18 19:07:08 +03:00
Awais Qureshi
ea944fc2d8 Merge branch 'master' into dwong/updgrade-django-5-get-storages 2025-06-17 22:42:55 -04:00
Pandi Ganesh
0c493b6ec2 feat: add Studio API for bulk enable/disable discussions for a course
Implemented Studio API for bulk enable/disable discussions for a course.
2025-06-17 16:23:47 +05:00
Chris Chávez
854d04dd33 fix: disallow editing components in unit that come from libraries (#36914) 2025-06-16 14:28:59 -07:00
Robert Raposa
f4c3575bb0 Revert "fix(settings): replace DEFAULT_FILE_STORAGE with STORAGES[default]" (#36907)
This reverts commit 39028b9500.
2025-06-13 16:57:47 +00:00
Ram Chandra Bhavirisetty
39028b9500 fix(settings): replace DEFAULT_FILE_STORAGE with STORAGES[default] 2025-06-13 11:40:56 -04:00
Daniel Wong
250a611078 feat: legacy_setting_key param was added to resolve storage backend 2025-06-11 11:35:14 -06:00
Daniel Wong
88ee5b4d28 fix: resolve feedback comments 2025-06-11 11:35:14 -06:00
Daniel Wong
835b74bb4f test: adding test cases for the export course metadata export storage 2025-06-11 11:35:14 -06:00
Daniel Wong
49864105cd feat: update file storage access to support Django 5.0 storages registry 2025-06-11 11:35:14 -06:00
Awais Qureshi
be09d1cd18 fix: removing deprecated SHA1PasswordHasher from tests. (#36881) 2025-06-09 16:31:51 -04:00
Kyle McCormick
29c1268d2b feat!: enable authoring MFE markdown editor waffle for everyone by default (#36872)
This adds a migration to turn on the new React-based Markdown editing option
for newly-created ProblemBlocks for all authors. The option is nested
under "Advanced settings", just like the Advanced (OLX) problem editor.

The migration is written such that it will *not* overwrite an existing global
"No" waffle flag. Furthermore, our waffle utilities are designed such that
org-level and course-level overrides will still take preference over the flag
that the migration creates. Therefore, this should only take effect in cases
where no existing waffle flag applies.

BREAKING CHANGE: Operators who do not want the new React-based Markdown editor
to be shown should create a flag contentstore.use_react_markdown_editor with
the value "No".

We plan to backport this to Teak.
Prior art for flipping waffles like this: 9b0024376a
Part of: https://github.com/openedx/platform-roadmap/issues/384

Co-authored-by: Muhammad Anas <muhammad.anas@arbisoft.com>
2025-06-09 10:58:04 -04:00
Taylor Payne
3e83efa609 fix: exclude fields from UpstreamSyncMixin in advanced settings api (#36831)
The UpstreamSyncMixin introduced in [1] which is added as a XBlock mixin,
currently contains four fields - `upstream`, `upstream_version`,
`upstream_version_declined`, and `upstream_display_name`. These fields are
coming through in the course advanced settings API endpoint
(`/api/contentstore/v0/advanced_settings/{course_id}`), and subsequently show
up in the Advanced Settings view in the frontend-app-authoring MFE, which they
shouldn't.

This PR resolves this issue by adding the fields from the `UpstreamSyncMixin`
into the FIELDS_EXCLUDE_LIST [2] of the `CourseMetadata` class. Unless the API is
called with `fetch_all=1` (the authoring MFE uses `fetch_all=0`), then these
fields will be filtered out.

[1] https://github.com/openedx/edx-platform/blob/master/cms/lib/xblock/upstream_sync.py#L289
[2] https://github.com/openedx/edx-platform/blob/master/cms/djangoapps/models/settings/course_metadata.py#L41

Fixes: https://github.com/openedx/frontend-app-authoring/issues/2018
2025-06-04 13:38:30 -04:00
Andrii
09f0406ec3 feat: add org_image_url to course_discovery index 2025-06-03 17:46:47 +03:00
Muhammad Adeel Tajamul
50cac078e8 chore: added NOTIFICATION_DIGEST_LOGO url in cms (#36840) 2025-06-03 14:21:12 +05:00
Daniel Wong
6c495ad283 fix: certificates_enabled flag now correctly returns its boolean value 2025-06-02 12:53:21 -06:00
Feanil Patel
3433152d90 Merge pull request #36757 from openedx/umar/remove_edxapp_csrf_settings
chore: remove csrf with scheme settings from edxapp
2025-06-02 13:01:57 -04:00
M Umar Khan
a2eda30488 chore: remove csrf with scheme settings from edxapp
See https://github.com/edx/edx-arch-experiments/issues/460 for more
details.
2025-06-02 12:12:09 -04:00
Chris Chávez
c2eb913dcb feat: Basic CRUD support for sections/subsections as containers [FC-0090] (#36762)
- Refactor of `test_containers.py` 8b9731dfa1
- Updates the `content_libraries/api/containers` and `content_libraries/rest_api` to support:
    - Basic CRUD for sections and subsections as containers
    - Basic CRUD support for section and subsection children
- Updates the `content/search` to support:
    - Basic CRUD for sections and subsections as containers in the search index
    - Basic CRUD support for section and subsection children in the search index
- Updates the `content_libraries/tests/test_containers.py` to test the new support
- Updates the `content/search/tests` to test the new support.
- I verified that the add/remove to collection works without major changes. Tests updated
2025-05-28 21:05:45 +00:00
Muhammad Adeel Tajamul
76f872cc1e chore: added notifications configuration in cms (#36791) 2025-05-26 13:35:48 +05:00
Jillian
21399b4818 fix: recurse through pasted block data to replace static paths (#36723)
Fixes an error that is triggered when trying to copy/pasting Drag-and-drop block into Courses.

When a block is pasted into a Course or Library, we perform a search/replace on block's data to replace any old static URLs with their new path. Ordinary blocks like HTML and Video have a simple string of data where static URLs may live, but DnDv2 blocks have a dict of data which can contain other dicts and lists of strings that need to be modified. Other XBlocks may have similarly complex structures, and so this fix will resolve them as well.

This fixes the issue by recursing into the data structure to locate all the strings where replacements may need to be made.

This fix helps Course Authors use content staging in their Courses.
2025-05-22 00:17:31 +00:00
Rômulo Penido
91247fa02f fix: remove double edit buttons on unit outline (#36770) 2025-05-22 09:20:57 +09:30
Tim McCormack
6740e75c0f Merge commit from fork
Allow overriding but prevent download by default.

Also, extract `PYTHON_LIB_FILENAME` Django setting as a shared function
and document the setting.
2025-05-21 14:14:51 -04:00
Chris Chávez
30ace04469 fix: clear buttons in advanced components editors in Libraries (#36752) 2025-05-21 11:03:39 +09:30
Chris Chávez
4b8bfe2307 fix: TinyMCE editor in advanced block editors [FC-0076] (#36754)
* fix: TinyMCE editors in advanced block editors
* Sets baseUrl to avoid an error in: 86eee4b05d/xblock/utils/public/studio_edit.js (L52)
* Uncouple the listener func of the cancel button (see the comment)
* chore: Add `edx_sga` in `LIBRARY_ENABLED_BLOCKS`
2025-05-21 10:58:19 +09:30
Daniel Valenzuela
c20e6ec7f3 fix: open mfe modal editor of new duplicated xblock (#36641)
When duplicating an xblock in the authoring MFE, the iframe was opening its own editor modal instead of the MFE modal.
2025-05-20 21:29:32 +00:00
Navin Karkera
1002f5f91b fix: support legacy studio_view in v2 library (#36748)
Fix "Add" button in LTI editor in v2 library. The iframe studio view renderer in library now supports legacy studio view.
2025-05-20 20:52:00 +00:00
Ahtisham Shahid
b0b90921f1 feat: added course creation date in index api (#36750) 2025-05-20 20:18:03 +05:00
Feanil Patel
88c7cd7bf3 feat!: Remove Legacy Preview Functionality (#36460)
* feat!: Remove all trivial mentions of PREVIEW_LMS_BASE

There are a few more mentions but these are all the ones that don't need
major further followup.

BREAKING CHANGE: The learning MFE now supports preview functionality
natively and it is no longer necessary to use a different domain on the
LMS to render a preview of course content.

See https://github.com/openedx/frontend-app-learning/issues/1455 for
more details.

* feat: Drop the `in_preview_mode` function.

Since we're no longer using a separate domain, that check always
returned false.  Remove it and update any places/tests where it is used.

* feat: Drop courseware_mfe_is_active function.

With the removal of the preview check this function is also a no-op now
so drop calls to it and update the places where it is called to not
change other behavior.

* feat!: Drop redirect to preview from the legacy courseware index.

The CoursewareIndex view is going to be removed eventually but for now
we're focusing on removing the PREVIEW_LMS_BASE setting.  With this
change, if someone tries to load the legacy courseware URL from the
preview domain it will no longer redirect them to the MFE preview.

This is not a problem that will occur for users coming from existing
studio links because those links have already been updated to go
directly to the new urls.

The only way this path could execute is if someone goes directly to the
old Preview URL that they saved off platform somewhere.  eg. If they
bookmarked it for some reason.

BREAKING CHANGE: Saved links (including bookmarks) to the legacy preview
URLs will no longer redirect to the MFE preview URLs.

* test: Drop the set_preview_mode test helper.

This test helper was setting the preview mode for tests by changing the
hostname that was set while tests were running.  This was mostly not
being used to test preview but to run a bunch of legacy courseware tests
while defaulting to the new learning MFE for the courseware.

This commit updates various tests in the `courseware` app to not rely on
the fact that we're in preview to test legacy courseware behavior and
instead directly patches either the `_redirect_to_learning_mfe` function
or uses the `_get_legacy_courseware_url` or both to be able to have the
tests continue to test the legacy coursewary.

This will hopefully make the tests more accuarte even though hopefully
we'll just be removing many of them soon as a part of the legacy
courseware cleanup.

We're just doing the preview removal separately to reduce the number of
things that are changing at once.

* test: Drop the `_get_urls_function`

With the other recent cleanup, this function is no longer being
referenced by anything so we can just drop it.

* test: Test student access to unpublihsed content.

Ensure that students can't get access to unpublished content.
2025-05-14 08:59:11 -04:00
Navin Karkera
d664f0e5d4 fix: update container key field usage 2025-05-12 06:58:15 +00:00
Rômulo Penido
f50565c730 feat: add last_published_at to upstream summary endpoint [FC-0083] (#36656)
Returns the last_published_at date from the upstream summary endpoint.
2025-05-09 12:04:39 -05:00
Braden MacDonald
2e91a05112 fix: Bugs with "Publish All Changes" in Library [FC-0083] (#36640)
* fix: "[created] received a naive datetime"
* fix: leaky "isolation" of events was causing test failures
* fix: make lib events more specific, emit them async, handle hierarchy correctly
* chore: bump openedx-events to 10.2.0 for new library PUBLISHED events
2025-05-08 11:57:07 -07:00
Muhammad Faraz Maqsood
be5a625e64 fix: security issue
- It's related previous PR: https://github.com/openedx/edx-platform/pull/36643/files.
- This time followed LMS template(5b3caa93e2/lms/templates/courseware/courseware-chromeless.html (L126C7-L127C42)) as we are not getting any error on LMS.

Attaching error for context:
`Uncaught SecurityError: Failed to read a named property 'offsetHeight' from 'Window': Blocked a frame with origin "https://studio.stage.edx.org/" from accessing a cross-origin frame.`
2025-05-06 11:13:13 +05:00
Tim McCormack
4c15e00611 docs: Improve docs for HIBP settings; remove duplicated cms copies (#34116)
- Clarify effects of enabling each policy.
- Document the thresholds and what policies they relate to.
- Express thresholds as floating point numbers to better hint at them not
  being intended as integer values.
- Change toggle use case from temporary to open_edx for login policies (as
  we're expecting to keep those toggles long term, as an optional feature).
- Remove links to private Jira tickets. (openedx Jira is now gone, and
  these tickets are only present in 2U's private Atlassian instance.)
- Import LMS HIBP settings into CMS (rather than duplicating them) but
  mark as unused.
2025-05-05 19:16:37 -04:00
Jillian
5b3caa93e2 feat: store content.child_usage_keys in Container search document [FC-0083] (#36528)
* feat: store content.child_usage_keys in Container search document
  Stores the draft children + published children (if applicable)

Related fixes:
* fix: lib_api.get_container does not take a "user" arg
* refactor: fetch_customizable_fields_from_container does not need a "user" arg
* refactor: moves tags_count into LibraryItem
   because anything that appears in a library may be tagged.
* refactor: remove get_container_from_key from public API
   API users must use get_container and ContainerMetadata.
* refactor: made set_library_item_collections take an entity_key string instead of
  a PublishableEntity instance, so we don't need to fetch a Container object to call it.
* refactor: changed ContainerLink.update_or_create to take the container PK
  instead of a Container object, since this is enough.
  Added container_pk to ContainerMetadata to support this.
2025-05-02 10:47:25 +09:30