Commit Graph

10647 Commits

Author SHA1 Message Date
Andrii
04febf0761 refactor: change logo_path to logo_url 2025-06-23 19:12:26 +03:00
Andrii
50fdf8446f refactor: use default logo as placehodler for organization 2025-06-19 16:24:02 +03:00
Andrii
66c03afdb2 refactor: change placeholder variable_name + url and add placeholder image 2025-06-18 19:07:08 +03: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
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
ihor-romaniuk
6366592dd0 fix: improve calculation for xblock action dropdown menu on unit page 2025-05-01 14:42:04 -03:00
Navin Karkera
c2d9e40be4 refactor: update sync model helper function docs and minor cleanup (#36599)
* refactor: update sync model helper function docs

Adds some comments to explain certain confusing sections

* refactor: sync library content method

* feat: use edited_on block field

* test: modified field in course block index

* fix: extract uncommon methods to child class from base
2025-04-30 13:40:52 -07:00
ihor-romaniuk
389547cc2b fix: unit xblock adaptivity and small visual enhancements 2025-04-30 16:56:28 -03:00
Raymond Zhou
f741786012 fix: toggle name typo (#36597) 2025-04-28 11:34:01 -04:00
Navin Karkera
1cd73d1b96 feat: support for syncing units from libraries to courses (#36553)
* feat: library unit sync
* feat: create component link only for component xblocks
* feat: container link model
* feat: update downstream api views
* feat: delete extra components in container on sync (not working)
* fix: duplicate definitions of LibraryXBlockMetadata
* test: add a new integration test suite for syncing
* feat: partially implement container+child syncing
* fix: blockserializer wasn't always serializing all HTML block fields
* feat: handle reorder, addition and deletion of components in sync

Updates children components of unit in course based on upstream unit,
deletes removed component, adds new ones and updates order as per
upstream.

* feat: return unit upstreamInfo and disallow edits to units in courses that are sourced from a library (#773)
* feat: Add upstream_info to unit
* feat: disallow edits to units in courses that are sourced from a library (#774)

---------

Co-authored-by: Jillian Vogel <jill@opencraft.com>
Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>

* docs: capitalization of XBlock

Co-authored-by: David Ormsbee <dave@axim.org>

* refactor: (minor) change python property name to reflect type better

* fix: lots of "Tried to inspect a missing...upstream link" warnings

when viewing a unit in Studio

* docs: mention potential REST API for future refactor

* fix: check if upstream actually exists before making unit read-only

* chore: fix camel-case var

* fix: test failure when mocked XBlock doesn't have UpstreamSyncMixin

---------

Co-authored-by: Braden MacDonald <braden@opencraft.com>
Co-authored-by: Chris Chávez <xnpiochv@gmail.com>
Co-authored-by: Jillian Vogel <jill@opencraft.com>
Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
Co-authored-by: Braden MacDonald <mail@bradenm.com>
Co-authored-by: David Ormsbee <dave@axim.org>
2025-04-24 11:41:47 -07:00
Kyle McCormick
875158f1ad feat!: Put "How It Works" Page Behind Waffle in Preparation for Removal (#36496)
We add a a new Waffle toggle:

* legacy_studio.logged_out_home

Unless enabled, unauthenticated users accessing Studio will now be sent
to the login page, and then redirected to the logged-in Studio home (the
course listing). By the Ulmo release, the Waffle will be removed along
with the howitworks page, and the new redirect-to-login behavior will
become the only available behavior.

The howitworks page is implemented as a legacy frontend, and we are not
seeing enough value in it to justify a rewrite in React. Via the DEPR
process we confirmed that the new behavior is acceptable, or even
preferable, as it removes edX.org-oriented language from the community
release and reduces the number of clicks needed for Studio users to log
in. We add an a new Waffle toggles

Part of: https://github.com/openedx/edx-platform/issues/36269
which is part of: https://github.com/openedx/edx-platform/issues/36275
2025-04-24 17:07:25 +00:00
Kyle McCormick
8e9f94424d feat!: Flip Studio MFE Waffle Flags to be On-By-Default (#36495)
This makes nearly all of Studio React-by-default by replacing the
"opt-in-to-React" flags with a set of parallel
"opt-out-of-React-and-use-the-legacy-experience" flags. Here is the
mapping:

* `contentstore.new_studio_mfe.use_new_unit_page` ->
  `!legacy_studio.unit_editor`
* `new_core_editors.use_new_problem_editor` ->
  `!legacy_studio.problem_editor`
* `new_core_editors.use_new_text_editor` ->
  `!legacy_studio.text_editor`
* `new_core_editors.use_new_video_editor` ->
  `!legacy_studio.video_editor`
* `new_studio_mfe.use_new_home_page` ->
  `!legacy_studio.home`
* `contentstore.new_studio_mfe.use_new_custom_pages` ->
  `!legacy_studio.custom_pages`
* `contentstore.new_studio_mfe.use_new_schedule_details_page` ->
  `!legacy_studio.schedule_details`
* `contentstore.new_studio_mfe.use_new_advanced_settings_page` ->
  `!legacy_studio.advanced_settings`
* `contentstore.new_studio_mfe.use_new_grading_page` ->
  `!legacy_studio.grading`
* `contentstore.new_studio_mfe.use_new_updates_page` ->
  `!legacy_studio.updates`
* `contentstore.new_studio_mfe.use_new_import_page` ->
  `!legacy_studio.import`
* `contentstore.new_studio_mfe.use_new_export_page` ->
  `!legacy_studio.export`
* `contentstore.new_studio_mfe.use_new_files_uploads_page` ->
  `!legacy_studio.files_uploads`
* `contentstore.new_studio_mfe.use_new_course_outline_page` ->
  `!legacy_studio.course_outline`
* `contentstore.new_studio_mfe.use_new_course_team_page` ->
  `!legacy_studio.course_team`
* `contentstore.new_studio_mfe.use_new_certificates_page` ->
  `!legacy_studio.certificates`
* `contentstore.new_studio_mfe.use_new_textbooks_page` ->
  `!legacy_studio.textbooks`
* `contentstore.new_studio_mfe.use_new_group_configurations_page` ->
  `!legacy_studio.configurations`

Part of: https://github.com/openedx/edx-platform/issues/36275
2025-04-24 12:34:35 -04:00
Ivan Niedielnitsev
3f67f3c295 feat: Import from modulestore APIs (#36540)
This PR is addressed at adding the functionality to import
modulestore-based content to the learning-core based learning
package.

Partof: https://github.com/openedx/frontend-app-authoring/issues/1681
2025-04-23 14:28:07 -04:00
Feanil Patel
544531423d Merge pull request #36532 from raccoongang/axm-default-advanced-modules
Allow Default Advanced Modules Configuration
2025-04-23 09:16:51 -04:00
Andrii
dcd7c1b171 refactor: move DEFAULT_ADVANCED_MODULES to hardcoded list instead of settings 2025-04-23 14:31:26 +03:00
Kyle D McCormick
4551aea70d feat: Install (sub)sections apps from openedx-learning 2025-04-22 18:51:34 -04:00
Chris Chávez
54ec998bee fix: Broken CSS styles of ora2 block editor [FC-0076] (#36220)
* It was this error 'Uncaught TypeError: el.timepicker is not a function' while rendering the editor. It's fixed adding the timepicker pluging in xblock_v2/xblock_iframe.html
* Added '.openassessment_cancel_button' and '.openassessment_save_button' as action buttons.
* Use openassessment manifest.json to load css from dist
2025-04-22 21:08:02 +00:00
Andrii
94c37e9449 refactor: simplify tests a bit & add DEFAULT_ADVANCED_MODULES to test settings 2025-04-22 11:59:05 +03:00
Kyle McCormick
57658b78d2 fix: add missing migraitons for import_from_modulestore (#36560) 2025-04-21 13:56:23 -04:00
Ivan Niedielnitsev
505b4f466c feat: Models for import_from_modulestore (#36515)
A new application has been created, described in this ADR:
https://github.com/openedx/edx-platform/pull/36545

have been created, as well as related models for mapping original content and
new content created during the import process. Python and Django APIs, as well
as a Django admin interface, will soon follow.
2025-04-17 19:03:46 +00:00
Chris Chávez
581596b52b fix: Transcripts in downstream creation [FC-0076] (#36509)
* Fix the issue described in https://github.com/openedx/frontend-app-authoring/issues/1352#issuecomment-2791305416
2025-04-16 17:11:03 +00:00
andrii-hantkovskyi
d5c50b5376 feat: [AXM-1899] add default advanced modules (#2634)
* feat: [AXM-1899] add default advanced modules

* test: [AXM-1899] add check for default advanced modules list

---------

Co-authored-by: Andrii <andrii.hantkovskyi@raccoongang.com>
2025-04-16 12:56:30 +03:00
Braden MacDonald
336fb018fb feat: support pasting units from courses into libraries (#36516)
* fix: don't allow pasting xblocks with children into libraries
* fix: IntegrityError: "Column 'md5_hash' cannot be null"
* feat: allow pasting a unit from a course into a library
* feat: auto-generate a nice block_id when pasting into a library
* test: add test for pasting unit from course into library
* fix: better handle potentially missing display_names during paste
* chore: clarifications and import cleanups
2025-04-15 15:25:46 -07:00
Arunmozhi
9f299df3a0 feat: adds scrollToXBlock message handler for cms iframe view (#36478)
This commit adds a new message handler to the XBlockContainerPage
CMS view, that allows the MFE to send a signal to the IFrame
and scroll to a specific XBlock.
2025-04-15 22:00:31 +05:30
Muhammad Anas
2930214067 feat: add markdown editor waffle flag (#36512)
This PR adds contentstore.use_react_markdown_editor course waffle flag in cms.
This flag helps in enabling the markdown editor in the authoring mfe.

This PR also adds the markdown_edited field in the Problem Xblock to persist the
user's choice of switching to the markdown editor on the authoring MFE.

More details in the authoring MFE PR: openedx/frontend-app-authoring#1805
2025-04-15 11:28:19 -04:00
Kyle McCormick
1e6b40ac9a fix: Globally Enable Studio Content REST API (#36488)
There was a waffle flag `contentstore.enable_studio_content_api`,
intended to gate the "experimental" REST APIs at
`<CMS_ROOT>/api/contentstore/v{0,1,2}/*`. In practice, these APIs are no
longer experimental: for the past few named releases, they have been
enabled in Tutor and used to power the Authoring MFE.

We are making the Authoring MFE default-on in all Open edX sites
starting in Teak, with the legacy authoring frontend slated for removal
by Ulmo. Therefore, we need to remove flag which is gating the REST API.
We are _not_ introducing a temporary opt-out toggle, as we do need feel
it is necessary.

Part of: https://github.com/openedx/edx-platform/issues/36275
2025-04-09 14:10:12 -04:00
Kyle D. McCormick
e6c24bdd0d refactor: Remove now-unused static asset Django settings
Closes: https://github.com/openedx/edx-platform/issues/36407
2025-04-09 13:38:36 -04:00
Kyle D McCormick
a8cb61dda9 fix: Remove Two Pointless Contentstore Waffle Flags
These flags had no effect, so they are being removed:

* new_core_editors.use_advanced_problem_editor
* new_editors.add_game_block_button

Related to: https://github.com/openedx/frontend-app-authoring/pull/1753
Part of: https://github.com/openedx/edx-platform/issues/26275
2025-04-09 13:38:36 -04:00
sarina
27848143c1 docs: Update refs to docs.edx.org 2025-04-07 11:33:49 -04:00
Muhammad Faraz Maqsood
0d60ba3265 chore: rename course optimizer name in dropdown 2025-04-07 10:39:50 +05:00
Muhammad Faraz Maqsood
87688af610 fix: move links with 500 status to forbidden links
move links with 500 status_code to external forbidden links category for manual checking
2025-04-04 10:51:12 +05:00