* feat: create DRF endpoint to get course index context
* refactor: update serializers location and added some tests
* refactor: move modulestore usage out of views
* fix: move course index call under bulk_operations
* test: add test to track db and mongo queries
---------
Co-authored-by: ruzniaievdm <ruzniaievdm@gmail.com>
This ADR goes back to a refactoring we made in the cms/djangoapps/contentstore djangoapp where we extracted business logic from view files to be reusable.
This directly links to https://discuss.openedx.org/t/contentstore-views-refactoring/11801.
This ADR only applies to the cms/djangoapps/contentstore folder.
We are proposing that business logic is always extracted from view files so that it can be reused and follows the service layer architecture pattern.
Datadog was removed 6+ years ago but some settings and related keys got
left behind. Get rid of them since we don't need them and also to
prevent people from assuming it's okay to hardcode datadog settings into
our codebase.
* feat: create DRF endpoint to get course index context
* refactor: update serializers location and added some tests
* refactor: move modulestore usage out of views
---------
Co-authored-by: ruzniaievdm <ruzniaievdm@gmail.com>
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: suppress emails
* feat: TNL-11230 No Lib reference
Work around dependency failure
* feat: TNL-11230 cleanup
* feat: TNL-11230 pylint
comment line too long
---------
Co-authored-by: Bernard Szabo <bszabo@edx.org>
BREAKING CHANGE: Removes all code, tests, and settings related to
indexing of V2 (blockstore-backed) content libraries in elasticsearch.
This includes indexing of top-level library metadata as well as indexing
of library block metadata. Operators who enabled the experimental
Library Authoring MFE *and* the experimental ENABLE_CONTENT_LIBRARY_INDEX
feature may notice that sorting, filtering, and searching of V2
libraries and their blocks may now be slower and/or less powerful.
The ENABLE_CONTENT_LIBRARY_INDEX feature was already disabled by
default, so most/all operators (including edx.org) should not notice
any difference.
Removed settings include:
* FEATURES['ENABLE_CONTENT_LIBRARY_INDEX']
* ENABLE_ELASTICSEARCH_FOR_TESTS
* TEST_ELASTICSEARCH_USE_SSL
* TEST_ELASTICSEARCH_HOST
* TEST_ELASTICSEARCH_PORT
For rationale, see the updated "Status" section of:
./openedx/core/djangoapps/content_libraries/docs/decisions/0001-index-libraries-in-elasticsearch.rst
Originally, Blockstore was an independent micro-service, accessed via a REST API.
Then, we changed Blockstore so it could be installed as an in-process Django app.
To support both modes, there existed a blockstore_api wrapper library in edx-platform,
with toggles controlling whether the wrapper called out to the micro-service's REST API versus the
Django app's Python API. Now that the micro-service Blockstore implementation is deprecated,
though, this wrapper library and toggles are just unnecessary complexity.
As a first step towards cleanup, we:
* remove several toggles and settings (details below);
* remove the blocokstore_api wrapper methods which called the REST API and
marshalled them back into Python objects; and
* remove all test cases which relied on the Blockstore micro-service (and were skippped in CI).
In the future, we will remove the content libraries indexer,
clean up the remaining bits of blockstore_api, and flatten out all
the Blockstore-related test class hierarchies which are no longer nceessary.
BREAKING CHANGE:
* These Django settings are removed:
* BLOCKSTORE_PUBLIC_URL_ROOT
* BLOCKSTORE_API_URL
* BLOCKSTORE_API_AUTH_TOKEN
* BLOCKSTORE_USE_BLOCKSTORE_APP_API
* The blockstore.use_blockstore_app_api Waffle switch is removed.
* edx-platform will act as it did when the DJango setting BLOCKSTORE_USE_BLOCKSTORE_APP_API
or the Waffle switch blockstore.use_blockstore_app_api were enabled. That is, any running Blockstore
micro-service instance will be ignored, and the Blockstore package which is installed into edx-platform
will be used instead.
Ref: https://github.com/openedx/blockstore/issues/296
This PR: https://github.com/openedx/edx-platform/pull/32282 introduced some duplications of existing functions and classes by accident. I am cleaning them up here:
- `StudioPermissionsService` class
- `duplicate_block function`
- `load_services_for_studio` function
Refactors and reworks the LibraryContentBlock so that its
sync-from-library operations are asynchronous and work with
V2 content libraries. This also required us to make
library_content block duplication asynchronous, as that
involves syncing from the source library.
For the sake of clarity, this PR includes two major method renames:
* update_children(...) -> sync_from_library(...)
* refresh_library(...) -> sync_from_library(upgrade_to_latest=True, ...)
an an XBlock HTTP handler rename:
/refresh_children -> /upgrade_and_sync
There are still a couple issues with import or duplication
of library_content blocks referencing V2 libraries other than
latest. These will be resolved in an upcoming PR.
Part of: https://openedx.atlassian.net/wiki/spaces/COMM/pages/3820617729/Spec+Memo+Content+Library+Authoring+Experience+V2
Follow-up work: https://github.com/openedx/edx-platform/issues/33640
Co-authored-by: Connor Haugh <chaugh@2u.com>
Co-authored-by: Eugene Dyudyunov <evgen.dyudyunov@raccoongang.com>
* feat: display tag counts on outline
* fix: taxonomies should default to allow_multiple=True
* fix: only load counts once per request
* chore: version bump for openedx-learning