Commit Graph

66833 Commits

Author SHA1 Message Date
Kyrylo Kireiev
2077249a94 Merge branch 'master' into kireiev/AXM-549/feat/upstream_PR_active_inactive_courses_API 2024-10-24 12:58:33 +03:00
Muhammad Farhan Khan
0c91b625bd Merge pull request #35506 from openedx/farhan/sass-to-css-video-block
feat! Dropping Sass support from builtin video block

https://github.com/openedx/edx-platform/issues/35570
2024-10-24 12:50:26 +05:00
github-actions[bot]
471e5bf1a2 feat: Upgrade Python dependency edx-enterprise (#35704)
* feat: Upgrade Python dependency edx-enterprise

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

* fix: skip failing migration check

---------

Co-authored-by: kiram15 <31229189+kiram15@users.noreply.github.com>
Co-authored-by: Kira Miller <kira.miller15@yahoo.com>
2024-10-23 15:48:22 -06:00
David Ormsbee
e286d78a29 chore: requirements updates (edx-search 4.1.0 and others) 2024-10-23 12:47:10 -04: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
Feanil Patel
de4f77b99a Merge pull request #35703 from openedx/feanil/upgrade-edx-codejail-784b2b8
feat: Upgrade Python dependency edx-codejail
2024-10-23 11:15:09 -04:00
Max Sokolski
37b9aa4aa1 Merge pull request #35711 from raccoongang/max/feat/pip-sandbox-requirements-sumac 2024-10-23 17:15:41 +03:00
Muhammad Farhan Khan
6259520651 Merge branch 'master' into farhan/sass-to-css-video-block 2024-10-23 18:52:43 +05:00
farhan
7764e47116 chore: remove video block scss files 2024-10-23 18:40:30 +05:00
farhan
8fb5b778c3 feat!: Dropping Sass support from builtin video block, replacing with vanilla CSS 2024-10-23 18:40:30 +05:00
David Ormsbee
d25e651145 Support static assets when copy/pasting between courses and libraries (#35668)
The biggest challenge is dealing with the mismatch between how Libraries store
assets (per-Component) and how Courses store assets (global Files and Uploads
space). To bridge this, we're going to kludge a component-local namespace in
Files and Uploads by making use of the obscure feature that you can create
folders there at an API level, even if no such UI exists.

In this commit:
* Assets work when copy-pasting between library components.
* Assets work when copy-pasting from a library to a course, with the convention
  being to put that file in a subdirectory of the form:
  components/{block_type}/{block_id}/file.
  Note that the Studio course Files page still just shows the filename.
* Assets work when copy-pasting from a course to a library.
  Top level assets are put into a static folder in the Component, per Learning
  Core conventions.

Limitations:
* Roundtrips don't work properly.
* There's no normalized form, so directories will start nesting if you copy
  from library and paste into course, then copy the pasted thing and paste back
  into library, etc. This was deemed acceptable for Sumac.

Low level stuff:
* XBlockSerializerForLearningCore has been removed, with the url_name stripping
  functionality added as an optional param to XBlockSerializer (the other stuff
  was for children and "vertical" -> "unit" conversion, neither of which are
  relevant now).
* url_name is now stripped out of anything added to the clipboard, so that we
  don't end up writing it in block.xml when it is redundant (and would be
  stripped out with the next write anyway).

For the Libraries Relaunch Beta. This should not affect any site which
has kept New Libraries disabled.

Issue: https://github.com/openedx/frontend-app-authoring/issues/1170
2024-10-23 09:21:27 -04:00
Max Sokolski
7b83d51ab7 feat: freeze edx-sandbox requirements for sumac
We ran:

    cp requirements/edx-sandbox/base.txt \
       requirements/edx-sandbox/releases/sumac.txt
2024-10-23 16:10:40 +03:00
Daniel Valenzuela
085b15a014 feat: itembank green button (#35706)
Adds Problem Bank to the main New Components buttons.

For the Libraries Relaunch Beta [FC-0062]

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

Co-authored-by: Jillian Vogel <jill@opencraft.com>
2024-10-23 08:33:05 -04:00
Kyle McCormick
af21100939 fix: Improve messaging, logging when adding Beta Library Content fails (#35707)
We have user-oriented messaging stuffed into the BadUpstream exception. We may
as well use it rather than just giving an opaque error about xblock references.

We also want to log this situation, since we'd expect that the library block
usage key that Studio provides should generally be valid. If it consistently
isn't, then that's an issue that operators are going to want to look into.
2024-10-23 08:31:29 -04:00
Braden MacDonald
4158a44307 feat: multi-select when adding blocks to problem bank (#35705)
This implements basic multi-select for adding components to a problem bank,
for the Libraries Relaunch Beta [FC-0062].

Part of: https://github.com/openedx/frontend-app-authoring/issues/1385
2024-10-23 08:29:16 -04:00
Kyle McCormick
e0c56aaf39 Merge pull request #35679 from open-craft/braden/pool-ui
"Bare Bones" UI for Problem Bank [FC-0062]

Part of: openedx/frontend-app-authoring#1385
2024-10-23 08:25:50 -04:00
Braden MacDonald
9e28ba92ec feat: minimal UI for the Problem Bank block 2024-10-22 17:27:04 -07:00
Feanil Patel
cf0be34712 docs: Explicitly declare the OS version that edx-platform supports. 2024-10-22 16:54:40 -04:00
Kyle McCormick
08c8e9d214 feat: ItemBankBlock (#35553)
This is a new XBlock that presents a random subset of its children. As of this commit, the block
can only be added as an Advanced component. For Sumac, we plan to enable it as part of the
Libraries Relaunch Beta, under the name "Problem Bank (Beta)"

The block does not care if its children are from V1 library, V2 library, or the course itself.
It shares the randomization logic with LegacyLibraryContentBlock. It is also fully backwards-compatible with LegacyLibraryContentBlock. So, once V1 libraries are migrated to V2 libraries (after Teak), we eventually
could point the `library_content` entry point at ItemBankBlock.

Part of: https://github.com/openedx/frontend-app-authoring/issues/1385
2024-10-22 15:40:46 -04:00
feanil
d45e63f473 feat: Upgrade Python dependency edx-codejail
Upgrade codejail to add 22.04 support

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-10-22 19:04:22 +00:00
Jillian
784b2b8c3c feat: add "beta" label to libraries v2 content + item bank buttons (#35690) 2024-10-22 09:18:45 -07:00
Cristhian Garcia
e67acd459f feat: add endpoint to get draft version of a library component asset (#35681)
Adds a new Studio-only libraries static asset endpoint at
/library_assets/blocks/{usage_key}. This endpoint will serve assets
only from the Draft branch, and is only available to people who have
read permission to the containing library.

This also moves the existing library asset endpoint that did lookups
by Component Version to /library_assets/component_versions/{uuid}

This change was motivated by the desire to make it easier to make the
editor preview work for images by having a single URL that will
consistently point to the latest version of the asset, rather than
having a new URL after every save (which the Component Version lookup
2024-10-22 12:08:26 -04:00
Usama Sadiq
fcf78db09e fix: pin urllib3 in user retirement scripts (#35699)
* fix: pin urllib3 in user_retirement scripts
2024-10-22 19:16:40 +05:00
edX requirements bot
6d53952a1e chore: Upgrade Python requirements (#35688) 2024-10-22 18:14:37 +05:00
MueezKhan246
e47fdbf95a Merge pull request #35684 from openedx/MueezKhan246/upgrade-edx-enterprise-fb25a5d
feat: Upgrade Python dependency edx-enterprise
2024-10-22 02:22:43 +05:00
MueezKhan246
ad006efb29 feat: Upgrade Python dependency edx-enterprise
added content_title, progress_status in get_learner_data_records for derived classed of learner data exporters.

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-10-21 20:28:43 +00:00
Chris Chávez
fb25a5d635 feat: Store published name and description in studio search index (#35678) 2024-10-21 12:25:49 -07:00
Daniel Valenzuela
a49110b5e1 feat: endpoint to publish single library v2 component (#35677) 2024-10-21 19:20:14 +00:00
Tim McCormack
869b621b86 build: Remove newrelic from dependencies; note system deps in README (#35683)
We don't need a dependency on `newrelic` in edx-platform, since it's
already brought in via edx-django-utils, which is where telemetry
dependencies belong anyhow.

Ran `make compile-requirements` to apply changes to lockfiles.

(Additional context: We may end up DEPRing the direct dependencies in
edx-django-utils as well and requiring deployers to install newrelic
separately. In any case, there aren't any places in openedx code that is
installed into the LMS or CMS that import newrelic directly.)

Also, update README to note system package dependencies that are required
for installing edx-platform deps. I had to reinstall my laptop and ran
into this again and wanted to actually document it this time.
2024-10-21 18:15:54 +00: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
e2d6765637 feat: expand support for versioned URLs in v2 XBlock runtime (#35676)
* fix: problem block could not be used with versioned handler URls

* refactor: simplify REST API handling of usage keys

* feat: add more version awareness and update tests

* fix: make the preview changes modal bigger as requested

* refactor: parse version at the urlconf layer too
2024-10-21 09:14:17 -07:00
Chris Chávez
9e14566f90 feat: Copy tags when sync library [FC-0062] (#35596)
* feat: Copy tags when sync library

* feat: Avoid delete object tag if is copied

* chore: Bump version of openedx-learning to 0.16.0

* test: Tests for copy paste library blocks

* feat: Sync tags when sync upstream
2024-10-21 15:24:46 +00:00
José Ignacio Palma
123ad8d82c feat: adds CourseAboutPageURLRequested and LMSPageURLRequested filters (#35142) 2024-10-21 10:35:00 -04:00
Arunmozhi
8b3befc520 Revert "fix: Open Responses Styling and Layout (#33717)" (#35474)
* Revert "fix: Open Responses Styling and Layout (#33717)"

This reverts commit 1dab744ba2.

* chore: bumps ora2 requirement

---------

Co-authored-by: Arunmozhi <arunmozhi@opecraft.com>
Co-authored-by: Jillian Vogel <jill@opencraft.com>
2024-10-21 12:53:32 +00:00
Muhammad Adeel Tajamul
968f4f716b feat: removed styling from course update notification (#35680) 2024-10-21 16:04:44 +05:00
Muhammad Farhan
f078b1444f fix: remove urllib3<2.0.0 constraint and update dependencies (#35533) 2024-10-21 15:35:06 +05:00
Braden MacDonald
83827a3dc2 feat: Confirmation modal to preview and accept v2 library updates (#35669) 2024-10-18 12:21:16 -07:00
github-actions[bot]
ca80d10cf9 feat: Upgrade Python dependency edx-enterprise (#35672)
Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

Co-authored-by: kiram15 <31229189+kiram15@users.noreply.github.com>
2024-10-18 13:14:39 -06:00
Jillian
96811d6452 feat: adds waffle flags for legacy libraries v1 and new libraries v2 (#35576)
* refactor: rename CourseHomeSerializer to StudioHomeSerializer

to better reflect how this serializer/API is used in the Authoring MFE

* feat: adds waffle flags for legacy libraries v1 and new libraries v2 in new Studio Home

These waffle flags replace the MFE env flag LIBRARY_MODE.

* refactor: use contentstore.toggles.libraries_v1_enabled()

and ENABLE_CONTENT_LIBRARIES feature toggle where possible.

ENABLE_CONTENT_LIBRARIES has been incorporated into both the
libraries_v1_enabled() and libraries_v2_enabled() toggles:
FEATURES['ENABLE_CONTENT_LIBRARIES'] must be true for either version of
libraries to be "enabled".
2024-10-18 09:43:01 -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
Muhammad Adeel Tajamul
42febb62ce fix: update email_content when grouping notifications (#35656) 2024-10-18 17:02:03 +05:00
Muhammad Adeel Tajamul
2bb4728ab8 chore: removed temp logs in email digest (#35663) 2024-10-18 17:01:44 +05:00
David Ormsbee
23c4276ec6 test: add data.py to acceptable isolated app imports
Per OEP-49, both api.py and data.py are allowed to be imported into
other apps:

https://open-edx-proposals.readthedocs.io/en/latest/best-practices/oep-0049-django-app-patterns.html#api-py
2024-10-17 13:57:09 -04:00
David Ormsbee
451012460d feat: versioned asset support for Learning Core XBlock runtime
Add support for displaying static assets in the Learing Core XBlock
runtime via "/static/asset-name" style substitutions in the OLX. This is
currently used for new Content Library components.

Static asset display is version-aware, so viewing older versions of the
XBlock content via the embed view will show the appropriate assets for
that version.
2024-10-17 13:57:09 -04:00
Kyrylo Kireiev
da7187e793 Merge branch 'master' into kireiev/AXM-549/feat/upstream_PR_active_inactive_courses_API 2024-10-17 19:38:28 +03: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
Muhammad Farhan
e841d650f7 chore: Update tox.ini to remove Python 3.8 support 2024-10-17 20:34:09 +05:00
Brian Mesick
568fe849e4 Merge pull request #35666 from openedx/bmtcril/pin_mypy
build: Pin MyPY due to internal error
2024-10-17 11:15:23 -04:00
KyryloKireiev
bf073fb68c refactor: [AXM-549] Change enrollments status API field name 2024-10-17 18:06:03 +03:00
Kyrylo Kireiev
3cde9d4f53 Merge branch 'master' into kireiev/AXM-549/feat/upstream_PR_active_inactive_courses_API 2024-10-17 18:00:05 +03:00