The announcements editor was never ported to frontend-app-authoring, and
the announcements display was never ported to frontend-app-learner-dashboard.
This announcements feature is rarely used, undocumented, non-a11y-friendly, and
there were no volunteers to port it to the new frontends. It is the last
remaining part of the legacy Studio "Maintenance" dashboard. So, we are
removing it.
BREAKING CHANGE: This removes...
* Studio Maintenance dashboard legacy frontend
* Studio Edit Announcements legacy frontend
* The snippet of legacy learner dashboard which renders announcements
* openedx/features/announcements djangoapp
* The ENABLE_ANNOUNCEMENTS feature flag
Not removed:
* The announcements_announcement table from openedx/features/announcements .
The table is most likely very small, as it is only populated by administrators. Removing
it would be more labor for us and more risk of toil for operators than is worthwhile.
Closes: https://github.com/openedx/edx-platform/issues/36263
This introduces the modulestore_migrator app, which can be
used to copy content (courses and libraries) from modulestore
into Learning Core. It is currently aimed to work on the legacy
library -> v2 library migration, but it will be used in the future
for course->library and course->course migrations.
This includes an initial REST API, Django admin interface,
and Python API.
Closes: https://github.com/openedx/edx-platform/issues/37211
Requires some follow-up work before this is production-ready:
https://github.com/openedx/edx-platform/issues/37259
Co-authored-by: Andrii <andrii.hantkovskyi@raccoongang.com>
Co-authored-by: Maksim Sokolskiy <maksim.sokolskiy@raccoongang.com>
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.
* 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".
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>
See https://github.com/openedx/edx-platform/issues/34702
This necessarily involves switching from calling
`StaticContent.is_versioned_asset_path` to determine whether to handle the
request to having a hardcoded urlpattern. I've made the choice to hardcode
the other two patterns similarly rather than using imported constants. The
mapping of URL patterns to database records should be explicit (even though
we don't expect those constants to change out from under us.)
I've renamed the middleware rather than choosing a new name for the
implementation because there are other references in tests and other code.
This was the smaller change.
A note on HTTP methods: The middleware currently completely ignores the
request's HTTP method, so I wanted to confirm that only GETs were being
used in practice. This query reveals that 99.8% of requests that this
middleware handles are GET, with just a smattering of PROPFIND and OPTIONS
and a tiny number of HEAD and POST:
```
from Transaction select count(*) facet request.method
where name = 'WebTransaction/Function/openedx.core.djangoapps.contentserver.middleware:StaticContentServer'
since 4 weeks ago
```
The Toggle State API lets global staff users inspect the
computed state of all toggles, which can be a helpful
short-circuit to reasoning about the various layers of
configuration that feed into edx-platform.
Currently the API is only enabled in LMS. This would enable
it in CMS as well. Although LMS and CMS share many of the same base settings,
they each have their own overrides and extensions to configuration,
so exposing a separate CMS Toggle State API will be beneficial.
* feat: TNL-11173 authoring API offered as v0, not v1
* docs: correct swaggerfile for authoring api
---------
Co-authored-by: Bernard Szabo <bszabo@edx.org>
Co-authored-by: Jesper Hodge <jhodge@outlook.de>
* feat: Add url that exposes taxonomy tags CRUD API
Include `content_tagging` namespace for content_tagging urls in cms
for `sub_tags_link` to work in multi-level taxonomy tags.
* chore: Bump openedx-learning version
This adds two new urls: `<studio-base>/cms-api/ui` and `<studio-base>/cms-api/schema` with swagger ui and swaggerfile only for the new CMS API using drf-spectacular
* feat: add taxonomies for org api
* chore: run CI
* feat: Add retrieve object_tags REST API (#577)
* chore: update requirements
---------
Co-authored-by: Yusuf Musleh <yusuf@opencraft.com>
* feat: added enrollment API for notification config
* feat: added apps.py in notifications
* feat: added waffle flag for notification app
* feat: added proper docs for the API
* feat: add endpoint to tell if video sharing feature is enabled for a course
* feat: create video setting endpoint
* feat: move toggle out of lms
* docs: update toggle location in comment
* docs: fix toggle annotation
Tests which @requires_blockstore (i.e. the Blockstore service) have
been made to run as a unit test using the installed Blockstore app, and
will be run by the platform CI.
The Blockstore service tests can still be run manually by setting
EDXAPP_RUN_BLOCKSTORE_TESTS=1
Related fixes:
* adds blockstore bundle storage settings
* let the studio devstack and test servers serve static files from
the /media URL This allows the blockstore/content libraries API to
serve blockstore assets in dev.
* Wrap ContentLibrary creation in an atomic transaction, so that if it
fails, the related bundle can be deleted directly from the database
during the exception handler. (Previously, we called a REST API which
deleted it as part of a separate service.)
This changes the "Sign out" link on Studio to point to Studio's own logout
view, which clears the session and then redirects to LMS's logout page. The
LMS logout page then skips loading the Studio logout because it is seen in
the Referer header.
This change also brings Studio better into line with how other IDAs perform
their logouts.
Background:
After the rollout of Studio OAuth, logouts initiated on Studio failed to
actually log out Studio (but all other IDAs were logged out). This was
because the LMS logout view loads the logout pages of other IDAs but skips
any that is a *prefix* match on the Referer header, and browsers now often
send a truncated version of the Referer for privacy. Therefore, Studio was
always skipped when coming from Studio.
The fix is to make sure that Studio has already performed its logout by the
time the LMS logout page is loaded.
One wrinkle here is that the LMS logout view is activated by `/logout`, but
the correct logout view (provided by auth_backends) is activated by
`/logout/` -- with a trailing slash. This is fragile and unfortunate, but
can be cleaned up when we later remove other leftovers of Studio's previous
ability to handle logistration.
ref: ARCHBOM-1897
Once LOGIN_URL is changed for an environment, the OAuth flow will be
activated. (See included temporary doc.)
This is for ARCHBOM-1860: Convert Studio to use LMS OAuth login.