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.
Normally, the course API would return an access error_code of
`course_not_started` if the course has not started yet. This change
breaks that up into two codes:
* if the course has not started:
* return error_code=`course_not_started_enterprise_learner` if the
learner is enrolled as a subsidized enterprise learner.
* else, return error_code=`course_not_started`.
This supports a change to the frontend which will interpret
`course_not_started_enterprise_learner` differently and trigger a
redirect to the enterprise (B2B) learner dashboard instead of the B2C
dashboard.
ENT-8078
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.
Since a part of this ADR details the USE-JWT-COOKIE
header which has been removed, this ADR was updated
with links to the newer ADR.
The status will remain accepted.
A change history was also added for this change,
as well as documenting some past changes.
This regex is used for checking if a field contains a URL. We did this because we didn't want URLs in a user's "full name".
The capturing groups on the current regex are not needed to capture a URL. This commit simplifies and makes the regex stricter by banning the character combination "://".
* 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