397 Commits

Author SHA1 Message Date
Kyle McCormick
20bc7113e3 feat!: Remove Studio Maintenance & Announcements (#37432)
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
2025-10-10 12:48:00 -04:00
Kyle McCormick
7275ce1634 feat!: modulestore_migrator (#36873)
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>
2025-09-24 11:02:05 -04:00
mubbsharanwar
54164a918c refactor: convert function based view to class based 2025-07-31 15:40:42 +05:00
Hunzlah Malik
89190cc55a Certificate activation handler to drf (#37037)
* feat: certificate_activation_handler to drf
2025-07-24 10:08:43 -04:00
Pandi Ganesh
0c493b6ec2 feat: add Studio API for bulk enable/disable discussions for a course
Implemented Studio API for bulk enable/disable discussions for a course.
2025-06-17 16:23:47 +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 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
5e51e2d5b7 fix: swagger docs ref_name conflicts (#36189)
* fix: swagger docs ref_name conflicts

* fix: swagger auto doc errors

* chore: bumps openedx-learning==0.18.2

---------

Co-authored-by: Jillian Vogel <jill@opencraft.com>
2025-01-30 20:32:18 +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
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
hajorg
cf6c55a9aa feat: get youtube videos edx_video_id for a course 2024-06-21 08:49:16 +01:00
Tim McCormack
0eb61e28d1 feat: Start conversion of StaticContentServer from middleware into view (#34703)
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
```
2024-06-10 15:44:46 +00:00
Syed Sajjad Hussain Shah
4d4f8f457d Revert "chore: moved user_authn all urls in urls.py (#34396)" (#34431)
This reverts commit fc63719ceb.
2024-03-27 11:33:38 +05:00
Syed Sajjad Hussain Shah
fc63719ceb chore: moved user_authn all urls in urls.py (#34396) 2024-03-25 22:05:55 +05:00
Braden MacDonald
f663739510 feat: Index Studio content using Meilisearch [experimental] (#34310) 2024-03-22 10:08:31 -07:00
Kyle McCormick
8ce5d83423 feat: enable Toggle State API in CMS (#33598)
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.
2023-12-13 15:59:23 +00:00
Jesper Hodge
7fd4c30daf Chore adjust swagger for api gateway (#33694)
* chore: add api.edx.org server and correct route to swagger file endpoints

* chore: make server urls for swagger doc depend on env variables

* chore: add yaml file server descriptions

* chore: rename authoring api route and add description to swagger

* Update cms/urls.py

Co-authored-by: connorhaugh <49422820+connorhaugh@users.noreply.github.com>

* fix: lint

* fix: lint

* fix: lint

---------

Co-authored-by: connorhaugh <49422820+connorhaugh@users.noreply.github.com>
2023-11-16 15:39:46 -05:00
bszabo
5d6e925c83 feat: TNL-11173 Authoring API is v0 for now (#33644)
* 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>
2023-11-03 11:49:35 -04:00
Yusuf Musleh
08d6607636 feat: Add url that exposes taxonomy tags CRUD API (#33525)
* 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
2023-10-23 11:07:46 -07:00
Rômulo Penido
e45460a2ce refactor: Move content_tagging django app so that CMS-only tests run (#33259) 2023-09-21 12:01:20 -07:00
Jesper Hodge
f197f9e61e add swagger for CMS API via drf-spectacular (#33282)
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
2023-09-19 21:06:40 +00:00
Awais Qureshi
9db024c435 feat!: upgrading django-storages to 1.11.1 2023-08-31 14:21:24 +05:00
Kristin Aoki
878e72024b feat: add API endpoint for asset usage search (#33092) 2023-08-30 11:48:19 -04:00
Awais Qureshi
3c76d6644f Revert "Revert "Revert "feat!: upgrading django-storages to 1.10.1 (#32571)" (#33109)" (#33111)" (#33113)
This reverts commit 2f8475c307.
2023-08-30 19:40:32 +05:00
Awais Qureshi
2f8475c307 Revert "Revert "feat!: upgrading django-storages to 1.10.1 (#32571)" (#33109)" (#33111)
This reverts commit 191b825a2c.
2023-08-28 14:46:21 +05:00
Awais Qureshi
191b825a2c Revert "feat!: upgrading django-storages to 1.10.1 (#32571)" (#33109)
This reverts commit 9281ea4a9a.
2023-08-28 14:05:38 +05:00
Awais Qureshi
9281ea4a9a feat!: upgrading django-storages to 1.10.1 (#32571)
* feat!: upgrading django-storages to 1.10.1
2023-08-28 13:13:28 +05:00
Rômulo Penido
ecc4a0d53d feat: add taxonomies for org api (#32871)
* 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>
2023-08-24 10:32:07 -07:00
edX requirements bot
aca521f256 Merge pull request #32578 from openedx/usamasadiq/remove-language-session-key-usage
fix: remove language_session_key usage
2023-08-16 06:05:19 -04:00
Usama Sadiq
4ee5964855 fix: fix django4 deprecation warnings (#32957) 2023-08-16 14:39:49 +05:00
Soban Javed
c45ac51475 fix: update urls and tests for cookies 2023-08-15 21:28:43 +05:00
UsamaSadiq
e332a5660e fix: remove language_session_key usage 2023-08-15 21:28:43 +05:00
Jesper Hodge
6598abbb6b Studio content api videos (#32803)
* refactor: extract methods to video_storage_handlers

* refactor: move private functions

* refactor: move functions to videos_storage_handlers

* refactor: asset_storage_handlers

* feat: add video api views

* feat: add video urls

* feat: add mock videos post

* refactor: mock video upload url

* fix: json extraction

* fix: url pattern for video deletion

* fix: video url views

* fix: lint

* fix: lint

* fix: tests

* fix: tests

* fix: tests

* Feat  studio content api transcripts (#32858)

* feat: add transcript endpoints

feat: add transcript upload endpoint, check that transcripts for deletion exist

fix: remove transcript credentials view cause out of scope

* fix: lint

* feat: TNL-10897 fix destroy() args to kwargs bug

---------

Co-authored-by: Bernard Szabo <bszabo@edx.org>

---------

Co-authored-by: Bernard Szabo <bszabo@edx.org>
2023-07-31 13:37:00 -04:00
Ahtisham Shahid
44d48f63ef refactor: removed notification app urls from cms (#32434) 2023-06-13 15:40:31 +05:00
Ahtisham Shahid
118ea3a024 feat: added enrollment api for notification config (#32162)
* 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
2023-05-09 11:51:31 +05:00
Kristin Aoki
af96cb1b21 feat: make video feature api to be course agnostic (#32173) 2023-05-04 13:33:07 -04:00
Jansen Kantor
b6ba32830a feat: add endpoint to tell if video sharing feature is enabled for a course (#31931)
* 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
2023-03-16 09:51:05 -04:00
Kristin Aoki
0d0f9e7b3c feat: add video_images_upload_enabled api so new video editor knows val 2022-10-05 11:09:24 -04:00
Jillian Vogel
8b77638bf0 test: refactors blockstore integration tests to run as unit tests.
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.)
2022-04-21 09:39:59 +01:00
Usama Sadiq
1cebd3ed7b Remove django-ratelimit-backend (#30054)
* fix: remove the usage of django-ratelimit-backend

Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
2022-03-24 17:21:56 +05:00
Awais Qureshi
fe57074dab feat!: Remove django-admin default login (#29876)
* feat!: Remove django-admin default login
2022-03-01 17:38:36 +05:00
Usama Sadiq
59a0acc768 Revert "feat!: Remove django-admin default login. (#29416)" (#29824)
This reverts commit be2a57902f.
2022-01-26 19:17:45 +05:00
Awais Qureshi
be2a57902f feat!: Remove django-admin default login. (#29416)
Now redirect the admin-login towards the lms login.
BOM-2855
2022-01-26 17:27:17 +05:00
Jawayria
c320d5cd1b fix: replace 'django.conf.url()' with 'django.urls.re_path()' 2021-12-14 19:53:24 +05:00
M. Zulqarnain
e54fb5f76e feat: New codemods on CMS (#28768) 2021-10-25 12:59:54 +05:00
Tim McCormack
0c164ad4c2 fix: Fix Studio logout by pointing to correct logout view (#28714)
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
2021-09-10 18:45:58 +00:00
Tim McCormack
f75ae33580 feat: Implement (but don't activate) LMS OAuth2 SSO login for Studio (#28533)
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.
2021-08-25 16:16:48 +00:00
Josh
bc082eab93 [BD-27] FEAT: Add new API endpoint for uploading transcripts (#27844)
* FEAT: Add new API endpoint for uploading transcripts

* Add log messages to transcript upload function
2021-06-08 08:34:51 -04:00
M. Zulqarnain
88471575ab refactor: pyupgrade in CMS (#26723) 2021-03-02 16:45:46 +05:00