Commit Graph

4827 Commits

Author SHA1 Message Date
Rômulo Penido
8d4909a999 fix: content libraries permissions
This PR changes the permissions for content libraries so that only
people who can create courses should be allowed to create new content
libraries.
2024-12-06 09:18:04 -05:00
Maria Grimaldi
1c835eb643 fix: return empty list when no courses are found for request (#35942)
This change addresses an issue reported while testing Sumac, where the API V2 is on by default in the authoring MFE: openedx/wg-build-test-release#428. It fails when retrieving an empty list of courses with the queryparams api/contentstore/v2/home/courses?page=1&order=display_name. When this was implemented, the course authoring MFE rendered the empty lists only with page=1 query param (didn't do any filtering/ordering by default), which was later changed to page=1&order=display_name which now ordered by default.

This issue occurs because all the filtering and ordering are done under the assumption that course_overviews is always a query set. However, that's only true when there are courses available and CourseOverview.get_all_courses is used. When not, an empty list is returned instead, raising a 500 error in Studio.
2024-12-05 15:52:57 +01:00
Braden MacDonald
919cc78be1 fix: Don't add 'x-is-pointer-node' to capa problems on paste 2024-11-29 00:27:43 +05:30
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
Jesper Hodge
38e5745e06 feat: add course optimizer waffle flag (#35884)
Description
Add a waffle flag to toggle on or off the new Course Optimizer feature per course.

Impact
Course Author

Context
Course Optimizer is a much-requested feature that has been aligned with the OpenEdx community. The only component for now is a broken link checker that will return a list of all broken links in a course to the frontend. There will be a new page for this that is a bit similar to the export page.

This PR only deals with adding a waffle flag.

Supporting information
Internal Ticket (2U):
https://2u-internal.atlassian.net/browse/TNL-11808
2024-11-20 20:51:46 +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
Alison Langston
e50490da88 feat: add optional inclusion date arg to course reindex command (#35830)
* feat: add optional inclusion date arg to course reindex command

* fix: pylint
2024-11-12 15:34:04 -05:00
Navin Karkera
68739ce73c fix: hide library_v2 and itembank in legacy library page (#35772)
Hide options to add library_v2 and itembank blocks in legacy library
page.
2024-11-12 20:36:41 +05:30
Rodrigo Martin
4e6c3dc598 fix(AU-2269): Add logs to get_course_youtube_edx_video_ids (#35804) 2024-11-07 15:40:42 -03:00
Navin Karkera
d82aadab51 fix: set upstream link for re-copied block from course originally from library (#35784)
Sets upstream link to library block for blocks that were copied from a course block which were originally copied/imported from a library.
2024-11-07 09:54:53 -05:00
Jillian
9bfdfeb313 fix: remove the "Legacy Library" button if libraries v1 are disabled (#35736)
Removes the "Legacy Library" button from the legacy Studio "new block" button array if Libraries v1 are disabled, either via waffle flag or via the ENABLE_CONTENT_LIBRARIES feature flag.
2024-11-06 11:00:04 -05:00
Feanil Patel
5904b54378 Merge pull request #35185 from openedx/feanil/blockstructure_cache
feat!: Drop the block_structure.storage_backing_for_cache WaffleSwitch
2024-11-06 10:52:47 -05:00
Jillian
689feba172 fix: allow non-Elasticsearch search engines when reindexing courses [FC-0062] (#35743) 2024-11-06 18:49:45 +05:30
Feanil Patel
80ed5ee2a4 fix: Send the course publish signal on course import. 2024-11-05 10:44:17 -05:00
Sagirov Evgeniy
f730276263 feat: Add API endpoint to manage course waffle flags (#35622)
Co-authored-by: Sagirov Eugeniy <evhenyj.sahyrov@raccoongang.com>
2024-11-04 15:13:37 -03:00
Kristin Aoki
e13d66d1e4 feat: support unit preview in learning MFE (#35747)
* feat: update preview url to direct to mfe

* fix: use url builder instead of string formatter

* fix: url redirect for never published units

* fix: remove 404 error when  not a preview or staff

* feat: update sequence metadata to allow draft branch
2024-11-01 11:03:06 -04:00
Navin Karkera
949378f63f fix: do not open MFE editors automatically on block paste (#35728) 2024-10-28 11:34:53 -07:00
Kristin Aoki
afd1394112 Revert "feat: update preview url to direct to mfe (#35687)" (#35732)
This reverts commit 2373dd02f9.
2024-10-28 17:26:29 +00:00
Kristin Aoki
2373dd02f9 feat: update preview url to direct to mfe (#35687)
* feat: update preview url to direct to mfe

* fix: use url builder instead of string formatter

* fix: url redirect for never published units
2024-10-28 10:31:53 -04:00
Muhammad Adeel Tajamul
ebe3dc5e12 fix: fixed course update notification UI in notification tray (#35715) 2024-10-28 15:47:08 +05:00
Cristhian Garcia
e8cdb06410 feat!: remove all references to content library types (#35726)
At one point, we envisioned having different kinds of libraries, e.g.
a "Video" library would be distinct from a "Problem" library. Later on,
we decided on a more generalized form of Libraries, where any given
library can hold any combination of content–which would then be
organized using collections and tagging.

Due to this shift in perspective, these values haven't actually been
used for a long time. This is just getting rid of them altogether.
2024-10-25 14:16:56 -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
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
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
9e28ba92ec feat: minimal UI for the Problem Bank block 2024-10-22 17:27:04 -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
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
Muhammad Adeel Tajamul
968f4f716b feat: removed styling from course update notification (#35680) 2024-10-21 16:04:44 +05: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
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
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
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
Zachary Hancock
d59c596fdf fix: allow courses to render with invalid proctoring provider (#35573) 2024-10-01 15:01:05 +00:00
Alison Langston
a4c7413e38 fix: gate use of proctoring api if provider is LTI based (#35564) 2024-10-01 08:53:38 -04:00
Braden MacDonald
67b490cab4 fix: suppress errors+warnings when video is used in a content library (#35544) 2024-09-26 09:35:17 -07:00
Peter Pinch
fe80a1cdcd Merge pull request #35406 from open-craft/cef/set-links-for-course-authoring-alert
feat: set links for CourseAuthoring discussion alert
2024-09-26 11:32:12 -04:00
Demid
448edd7e5f feat: add can_access_advanced_settings to studio home (#35426) 2024-09-12 12:36:35 -04:00
Zachary Hancock
4b827bf9be feat: show error on courses with unknown proctoring providers (#35445) 2024-09-10 09:02:13 -04:00
Alison Langston
e498d2087d fix: allow courses to render with invalid proctoring provider (#35430) 2024-09-09 10:51:06 -04:00
cef
73364712ba feat: set links for CourseAuthoring discussion alert 2024-09-09 08:42:36 -05:00
Kaustav Banerjee
79fb1cc404 fix: hide new library button for ineligible users in split studio view (#35316) 2024-09-06 11:21:56 -07:00
Muhammad Adeel Tajamul
481a50717a feat: updated content in course_update notification (#35373) 2024-08-29 18:07:57 +05:00
Kristin Aoki
36a3b0ba81 Revert "fix: update course discussion config before course load (#35219)" (#35349)
This reverts commit 5c0942481c.
2024-08-22 19:49:21 +00:00
Ahtisham Shahid
5c0942481c fix: update course discussion config before course load (#35219)
fix: update course discussion config before course load

fix: updated unit tests

fix: resolved content issue in renamed notification
2024-08-12 07:53:55 +00:00
Ahtisham Shahid
9bd692413a fix: make course update email pref false (#35224)
fix: updated unit tests

fix: updated unit tests
2024-08-07 14:55:02 +05:00
Eemaan Amir
085a2f5815 refactor: deprecated course update notification waffle flag (#35190) 2024-07-30 11:57:51 +05:00
Kristin Aoki
8d0ada54c4 feat: add waffle flag for beta testing new problem editor parser (#35184)
* feat: add waffle flag for beta testing new problem editor parser

* chore: remove commented out code

* fix: failing test
2024-07-26 12:00:42 -04:00