Commit Graph

2646 Commits

Author SHA1 Message Date
Chris Chávez
854d04dd33 fix: disallow editing components in unit that come from libraries (#36914) 2025-06-16 14:28:59 -07:00
Rômulo Penido
91247fa02f fix: remove double edit buttons on unit outline (#36770) 2025-05-22 09:20:57 +09:30
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
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
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
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
sarina
1e3074a3f9 docs: Update edx.rtd.io links to docs.openedx.org 2025-04-02 12:10:56 -04:00
Ihor Romaniuk
f5c17bb88c feat: [FC-0070] add events and style for rendering Split xblock in chromeless template (#35813)
This feature introduces functionalities to improve XBlock interactions within iframes:

  * Add styles that adopt default styles for Split Test which renders chromless template via iframe in MFE Authoring.
  * When the isIframeEmbed option is enabled, the XBlock sends a postMessage to the parent window. When sending such a message, the standard link transition is cancelled and the transition is carried out in MFE Authoring.
2025-03-31 18:31:59 -03:00
Saad Yousaf
811fe1ba48 fix: make course optimizer specific changes to user task completion email 2025-03-21 15:13:24 +05:00
Peter Kulko
0319d62a78 feat: course unit - edit iframe modal window (#35777)
Adds logic to support the functionality of editing xblocks via the legacy modal editing window.
2025-02-20 17:02:43 -03:00
Kyle D. McCormick
6124695fdf refactor: Remove broken Force-Publish UI from Studio
Co-Authored-By: Feanil Patel <feanil@axim.org>
2025-02-19 09:07:57 -05:00
Kyle McCormick
569c2d9ad2 Revert "fix: Remove pointless Maintenance and Announcement apps (#35852)"
This reverts commit 9274852f2d.
2025-02-19 09:07:57 -05:00
Navin Karkera
a1d0826a2a feat: entity link view and api (#36190)
Adds api for listing upstream entity links for a given course.
2025-02-18 15:34:00 +00:00
Saad Yousaf
eaf6f66828 fix: styling fix for course optimizer legacy tool link 2025-02-07 15:46:19 +05:00
Raymond Zhou
02fc9c928f 2u/course optimizer (#35887) 2025-02-06 12:47:17 -05:00
Ihor Romaniuk
8aeaaf4e21 feat: [FC-0070] add message events and styles to the library content page (#35785)
This introduces improvements for XBlock interactions within iframes:

* Add default styles for Library Content that renders in the iframe in the new Studio unit page
* When the `isIframeEmbed` option is enabled, the XBlock sends a `postMessage` to the parent window. When sending such a message, the standard link transition is cancelled and the transition is carried out in the MFE.
2025-01-16 14:05:26 -03:00
Navin Karkera
e6ddd9c7c1 refactor: remove unnecessary padding from lib component picker (#36073)
Library component picker and Problem bank picker iframe had unnecessary
padding resulting in multiple border/shadow in the modal.
2025-01-10 10:30:58 -05:00
Kyle McCormick
9274852f2d fix: Remove pointless Maintenance and Announcement apps (#35852)
The Studio Maintenance app had two features:

* "Force Course Publish", which literally doesn't do anything. All it
  does is tell you what version *would* be seen by users *if* the course
  were to be published--no publishing actually occurs via this feature.

* "Announcements", which writes to the announcements_announcement
  database table, but doesn't actually display anywhere.

Having these pages in the platform is actively misleading and creates a
maintenance burden for edx-platform developers, so we remove them.

Note that this commit does not include a migration for the announcements
Django app. So, announcements_announcement table will not be deleted.
Given the small expected size of any past-authored announcements, we are
not worried about leaving them in the database perpetually.
2024-11-26 15:15:27 +00:00
Navin Karkera
49330a222a feat: post message on preview library block changes (#35861)
Posts message with library xblock changes info instead of displaying a modal if the unit is rendered in an iframe.
2024-11-19 19:07:28 +00:00
Navin Karkera
d9f6afa264 feat: add beta flag to component templates (#35802)
Mark components like libraryv2 and problem bank beta in API to be used by both legacy templates and new authoring mfe.

Also updates order of components.
2024-11-13 18:27:54 +00:00
Navin Karkera
e2a9a37d68 feat: show alert while editing v2 library content [FC-0062] (#35700)
Adds warning alert in edit modal for library v2 content in both legacy and new
MFE editors. For the Libraries Relaunch Beta.

Part of: https://github.com/openedx/frontend-app-authoring/issues/1340

Co-authored-by: Chris Chávez <xnpiochv@gmail.com>
2024-10-23 16:03:26 +00:00
Braden MacDonald
9e28ba92ec feat: minimal UI for the Problem Bank block 2024-10-22 17:27:04 -07:00
Jillian
784b2b8c3c feat: add "beta" label to libraries v2 content + item bank buttons (#35690) 2024-10-22 09:18:45 -07:00
Navin Karkera
7e8fb4393e feat: adds Library Content (v2) button to Studio Unit page (#35670)
Requires that v2 libraries are enabled.
2024-10-21 10:32:54 -07:00
Braden MacDonald
83827a3dc2 feat: Confirmation modal to preview and accept v2 library updates (#35669) 2024-10-18 12:21:16 -07:00
Sagirov Evgeniy
e4a1e41367 feat: new Studio view for rendering a Unit in an iframe [FC-0070]
The first attempt at creating a new MFE-driven page for Studio Unit
rendering involved rendering each XBlock separately in its own iframe.
This turned out to be prohibitively slow because of the many redundant
assets and JavaScript processing (e.g. MathJax) that happens for each
XBlock component.

In order to mitigate some of these issues, we decided to try a hybrid
approach where we render the entire Unit's worth of XBlocks at once on
the server side in a Studio view + template, and then invoke that from
frontend-app-authoring as an iframe. The frontend-app-authoring MFE
would still be responsible for displaying most of the interactive UI,
but the per-component actions like "edit" would be triggered by buttons
on the server-rendered Unit display. When one of those buttons is
pressed, the server-rendered UI code in the iframe would use
postMessage to communicate to the frontend-app-authoring MFE, which
would then display the appropriate actions.

To make this work, we're making a new view and template that copies
a lot of existing code used to display the Unit in pre-MFE Studio, and
then modifying that to remove things like the header/footer so that it
can be invoked from an iframe.

This entire design is a compromise in order to do as much of the UI
development in frontend-app-authoring as possible while keeping
XBlock rendering performance tolerable. We hope that we can find
better solutions for this later.

Authored-by: Sagirov Eugeniy <evhenyj.sahyrov@raccoongang.com>
2024-10-18 10:03:07 -04:00
Kyle McCormick
795d039581 feat: Upstream Sync with Content Library Blocks (#34925)
This introdues the idea of "upstream" and "downstream" content,
where downstreams (like course components) can pull content updates from
upstreams (like learning core-backed content library blocks). This
supports the upcoming Content Libraries Relaunch Beta for Sumac.
New features include:

* A new XBlockMixin: UpstreamSyncMixin.
* A new CMS Python API: cms.lib.xblock.upstream_sync
* A new CMS JSON API: /api/contentstore/v2/downstreams
* A temporary, very basic UI for syncing from Content Library blocks

Implements:
https://github.com/kdmccormick/edx-platform/blob/kdmccormick/upstream-proto/docs/decisions/0020-upstream-block.rst

Co-authored-by: Braden MacDonald <braden@opencraft.com>
2024-10-17 16:02:26 +00:00
Peter Pinch
c3d68b13f8 Merge pull request #34432 from DmytroAlipov/add-adaptive-display-of-links 2024-10-15 17:58:28 -04:00
Kyle McCormick
2bbd8ecd18 feat!: Remove outdated Libraries Relaunch cruft (#35644)
The V2 libraries project had a few past iterations which were never
launched. This commit cleans up pieces from those which we don't need
for the real Libraries Relaunch MVP in Sumac:

* Remove ENABLE_LIBRARY_AUTHORING_MICROFRONTEND,
  LIBRARY_AUTHORING_FRONTEND_URL, and
  REDIRECT_TO_LIBRARY_AUTHORING_MICROFRONTEND, all of which are obsolete
  now that library authoring has been merged into
  https://github.com/openedx/frontend-app-authoring.
  More details on the new Content Libraries configuration settings are
  here: https://github.com/openedx/frontend-app-authoring/issues/1334

* Remove dangling support for syncing V2 (learning core-backed) library
  content using the LibraryContentBlock. This code was all based on an
  older understanding of V2 Content Libraries, where the libraries were
  smaller and versioned as a whole rather then versioned by-item.
  Reference to V2 libraries will be done on a per-block basis using
  the upstream/downstream system, described here:
  https://github.com/openedx/edx-platform/blob/master/docs/decisions/0020-upstream-downstream.rst
  It's important that we remove this support now so that OLX course
  authors don't stuble upon it and use it, which would be buggy and
  complicate future migrations.

* Remove the "mode" parameter from LibraryContentBlock. The only
  supported mode was and is "random". We will not be adding any further
  modes. Going forward for V2, we will have an ItemBank block for
  randomizing items (regardless of source), which can be synthesized
  with upstream referenced as described above. Existing
  LibraryContentBlocks will be migrated.

* Finally, some renamings:

  * LibraryContentBlock -> LegacyLibraryContentBlock
  * LibraryToolsService -> LegacyLibraryToolsService
  * LibrarySummary -> LegacyLibrarySummary

  Module names and the old OLX tag (library_content) are unchanged.

Closes: https://github.com/openedx/frontend-app-authoring/issues/1115
2024-10-15 11:32:01 -04:00
Dima Alipov
e4c69565f4 feat: adaptive display of links
Do not display the 'Learn more' and 'Share feedback' links for
banner that is enabled by the context_course.discussions_settings
flag if the URLs for these links are not set in the settings.
2024-10-12 13:07:39 +02:00
Braden MacDonald
7316111b35 fix: Improve v2 library block permissions checks for read-only authors (#35598) 2024-10-08 10:22:41 -07:00
Jeremy Ristau
1d94cf3c2a chore: Remove edge reference in notification 2024-10-07 12:47:53 -04:00
Deborah Kaplan
8c923bea24 feat!: removes deprecated v1 certificate behavior (#35562)
* feat!: removes deprecated v1 certificate behavior

this removes the long-deprecated v1  certificate behavior. This removes
the old-style date selection behavior  (ie., not a choice between
*Immediately upon passing*, *End date of course*, *A date after the course
end date*), which is no longer reliably maintained or supported in
Studio or Credentials.

FIXES: #35399
2024-10-02 12:06:57 -04:00
Varsha Menon
ed59e79417 fix: fix broken proctoring settings link 2024-09-24 09:23:57 -04:00
Rômulo Penido
bb6ac5a898 feat: new unstable URL to render a v2 library xblock in an iframe (#35473) 2024-09-13 11:45:33 -07:00
Artur Gaspar
90fc5f8dbf feat: open new editors from non-unit Studio container page (#33575)
Make the edit button on a container page for a non-unit block
(i.e. an individual text, problem or video block) open the new
editor when the relevant flag is enabled.
2024-05-31 11:30:59 -04:00
Kyle McCormick
15caa9746f refactor: Completely remove Blockstore (#34739)
Blockstore and all of its (experimental) functionality has been replaced with
openedx-learning, aka "Learning Core". This commit uninstalls the now-unused
openedx-blockstore package and removes all dangling references to it.

Note: This also removes the `copy_library_from_v1_to_v2` management command,
which has been broken ever since we switched from Blockstore to Learning Core.

Part of this DEPR: https://github.com/openedx/public-engineering/issues/238
2024-05-13 09:48:18 -04:00
Rômulo Penido
b42da7429f feat: Enable taxonomy/tagging feature in MFE by default (#34633)
* feat: make tagging feature enabled by default

* fix: use the correct flag for tagging enabled

* fix: make compatible with other changes from master

* fix: more compatibility fixes

* fix: show tag counts at all levels of the outline, not just units

* chore: typo

* test: fix counts in test suite now that tagging is on by default

---------

Co-authored-by: Braden MacDonald <braden@opencraft.com>
Co-authored-by: Yusuf Musleh <yusuf@opencraft.com>
2024-05-09 18:57:05 +05:30
Kaustav Banerjee
d43a2f73eb feat: default grade designations configurable from settings (#32406) 2024-05-08 01:14:03 +05:30
Yusuf Musleh
a3924f687b feat: Tag sections, subsections, and the whole course (#34690)
(In the legacy UI, if the 'new_studio_mfe.use_tagging_taxonomy_list_page' waffle flag is enabled)
2024-05-07 10:29:35 -07:00
Maria Grimaldi
b792222772 fix: add support to Group Configuration view for Teams partitions (#34643) 2024-05-06 11:46:02 -04:00
Navin Karkera
61b8961cdf fix: auto enroll users when added as staff (#32561)
The course team management section under Instructor > Membership tab
allows users to be added a role even if are not enrolled in the course.
This is behaviour does not match the help text displayed in the section.

This PR updates modify_access api to enrolls user if they are not enrolled
after adding them to a role as well as changes the help text to reflect
actual changes.
2024-04-26 13:16:32 -04:00
Maria Grimaldi
e3dfbf2847 fix: fix typo in share embed link editor (#34470) 2024-04-04 14:09:11 -04:00
Omar Al-Ithawi
5a437779d9 fix: add fallback gettext function if translations aren't pulled in dev envs (#34416) 2024-03-27 13:20:12 -04:00
Kristin Aoki
6c54c8fd15 fix: infinite load for library content block view (#34412)
* fix: hide view button when block is not configured

* fix: remove script for load timer if no children or library

* fix: remove print message

* fix: NoneType error is tests
2024-03-25 11:04:16 -04:00
Lewis M. Kabui
3a84339a95 fix: Use Locator property block_id. (#34187)
This change has been made to address 9 deprecation warnings which
can be seen after the tests are run.

`name` property of Locators has been deprecated and replaced by the
`block_id` property.

Co-authored-by: Lewis Kabui <lewisemm@users.noreply.github.com>
2024-03-18 12:10:25 -07:00
Kshitij Sobti
c3c0adf978 feat: add support for zip files to course and library import code (#34191)
Co-authored-by: Rodrigo Ferreira de Souza <rodfersou@gmail.com>
2024-03-08 18:51:35 +01:00
Bryann Valderrama
8f886734f6 feat: show message in subsection visibility tab when hft is enabled (#33981)
Shows a message in the visibility tab of the subsections when the Hide From TOC is enabled.

Ref: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/3853975595/Feature+Enhancement+Proposal+Hide+Sections+from+course+outline
2024-03-07 15:31:50 -04:00
Bryann Valderrama
19bc5c802c feat: add share link button when hide from toc is enabled in sections (#34043)
* feat: add share link modal when hide from toc is enabled

Adds a new button in the child subsections of sections with Hide From TOC enabled.
This button displays a new modal with two tabs. The first tab displays a button
that allows you to copy the link of that subsection to the clipboard. The second
tab displays a button that allows you to copy the embedded link of the same
subsection to the clipboard.

Ref: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/3853975595/Feature+Enhancement+Proposal+Hide+Sections+from+course+outline
2024-03-07 14:12:17 -04:00