Commit Graph

10288 Commits

Author SHA1 Message Date
Navin Karkera
9cd1d7c3c8 feat: create DRF endpoint to get course index context (#33943)
* 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>
2024-01-08 09:36:56 -05:00
Andy Shultz
a471e59551 feat: progress logging when doing a reindex
logs total and every 10 items

includes a flag to reduce logging level because our normal info
logs swamp progress logging.
2024-01-03 10:37:52 -05:00
Asad Ali
ec86398550 fix: respect ENABLE_NEW_STRUCTURE_DISCUSSIONS flag in course import (#33975) 2024-01-03 10:03:06 -05:00
Jenkins
145609cb5e chore(i18n): update translations 2024-01-02 15:28:09 -05:00
Jenkins
13cee3eac0 chore(i18n): update translations 2023-12-24 16:04:21 -05:00
Kristin Aoki
3c1b81c58b fix: timeout error for legacy page (#33965) 2023-12-21 09:27:52 -05:00
Kristin Aoki
9f5252c6ee feat: separate home api call into load, course, and library info (#33909) 2023-12-19 08:32:50 -05:00
connorhaugh
2eac2ef638 feat: keep learner state associated after libraries migration (#33920)
* fix: preserve learner state after v2 migration

Co-authored-by: Kyle McCormick <kyle@axim.org>

---------

Co-authored-by: Kyle McCormick <kyle@axim.org>
2023-12-18 15:14:28 -05:00
Braden MacDonald
5ab6238243 fix: handle paste of library content blocks correctly (#33926) 2023-12-18 09:48:46 -08:00
Jenkins
82f3cecd77 chore(i18n): update translations 2023-12-17 16:04:27 -05:00
connorhaugh
2573f34115 Revert "feat: create DRF endpoint to get course index context (#33667)" (#33935)
This reverts commit aaea6e5b14.
2023-12-15 13:49:57 -05:00
Jesper Hodge
f124ac8e99 Docs: contentstore service layer ADR (#33815)
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.
2023-12-15 13:48:35 -05:00
Feanil Patel
5ec8737856 chore: Remove old datadog related settings.
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.
2023-12-14 12:17:37 -05:00
Navin Karkera
aaea6e5b14 feat: create DRF endpoint to get course index context (#33667)
* 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>
2023-12-14 09:54:20 -05:00
Chris Chávez
6763928d60 style: UX Refinements on tagging components (#33884) 2023-12-13 11:28:27 -08: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
Kristin Aoki
ebf91fc9ad feat: add api for multiple video downloads (#33882) 2023-12-12 14:37:48 +00:00
Kristin Aoki
d08e93d42c feat: update cors headers for cross domain request (#33898) 2023-12-12 09:09:18 -05:00
Erica Nwoga
a74f510f71 feat: post handler for agreements api (#33488) 2023-12-11 13:58:35 -05:00
Jenkins
299cafa985 chore(i18n): update translations 2023-12-10 16:04:28 -05:00
Braden MacDonald
4c48f54de7 fix: two bugs with copy/paste functionality (#33897)
* fix: error pasting a unit containing a completely blank problem
* fix: copying an XBlock with emoji content would fail
2023-12-08 10:09:18 -08:00
bszabo
97f39f6972 Bszabo/tnl 11230 library content emails (#33899)
* 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>
2023-12-08 10:08:37 -05:00
Kyle McCormick
140f85853d feat!: remove Content Libraries V2 index (#33888)
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
2023-12-07 14:57:31 -05:00
Kristin Aoki
9bf18b1e23 feat: add url to usage location (#33855) 2023-12-07 11:19:35 -05:00
Kyle McCormick
27803f51c8 feat!: assume & remove BLOCKSTORE_USE_BLOCKSTORE_APP_API (#33765)
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
2023-12-06 15:15:18 +00:00
Ahtisham Shahid
e9941d3c35 fix: Added check while syncing discussion settings in import (#33868) 2023-12-06 11:05:32 +05:00
hajorg
0190a0cc9e feat: use function to access xpert translations ui waffle flag 2023-12-05 17:56:45 +01:00
hajorg
4bc2e74a40 fix: resolve lint issue 2023-12-05 17:34:32 +01:00
hajorg
b70e29a0ab feat: add test for is_ai_translations_enabled 2023-12-05 17:34:32 +01:00
hajorg
00d1cf5e0b feat: add is_ai_translations_enabled to get_course_videos_context util 2023-12-05 17:34:32 +01:00
Jenkins
5547ec6ff3 chore(i18n): update translations 2023-12-05 09:53:06 -05:00
Jesper Hodge
17d4a55869 refactor: remove function and class duplications (#33673)
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
2023-12-04 14:44:13 -05:00
Braden MacDonald
99667f6fb6 fix: "Copy Unit" button should be behind enable_copy_paste_units flag (#33867) 2023-12-01 13:35:58 -08:00
Pooja Kulkarni
f5b246d0e9 feat: copy/paste unit from within a unit in Studio - feature flagged (#33724)
(requires the contentstore.enable_copy_paste_units waffle flag)
2023-12-01 11:33:34 -08:00
Kristin Aoki
9085bc140e fix: usage_locations always returning empty (#33830) 2023-11-28 16:35:45 -05:00
Kristin Aoki
a7ce23602c fix: page redirect for libraries (#33806) 2023-11-28 12:29:12 -05:00
Jenkins
1734fdc0dc chore(i18n): update translations 2023-11-26 16:09:14 -05:00
Navin Karkera
e9ca49d3a6 fix: session_language url renamed to update_language
The url was renamed from session_language to update_language but it was still referred to in some html templates
2023-11-23 22:06:19 +05:30
Kristin Aoki
ce2734e907 feat: update video and asset api to include usage loactions (#33746) 2023-11-22 12:11:35 -05:00
Chris Chávez
f72710e261 feat: Display tags on the Unit page in Studio (feature-flagged) - Take 2 (#33761) 2023-11-21 12:12:17 -08:00
Ahtisham Shahid
8c871e3e7f fix: sync discussions config and course data (#33675)
* fix: sync discussions config and  course data
2023-11-21 12:21:08 +05:00
Jesper Hodge
e5ff63c312 fix: remove slashes from authoring api (#33741) 2023-11-20 12:45:35 -05:00
Kyle McCormick
e800ae7622 feat: provisionally support V2 libraries in LibraryContentBlock (randomized only) (#33263)
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>
2023-11-20 15:58:10 +00:00
Jenkins
c53cf9f1c3 chore(i18n): update translations 2023-11-20 10:57:40 -05:00
Rebecca Graber
c66ed87f65 Revert "feat: Tag List on Unit page (feature-flagged) (#33645)" (#33740)
This reverts commit 104d42c67a.
2023-11-17 20:12:47 +00:00
Chris Chávez
104d42c67a feat: Tag List on Unit page (feature-flagged) (#33645) 2023-11-17 10:03:28 -08: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
Braden MacDonald
ed379926c2 feat: display tag counts on course outline page (feature flagged) (#33696)
* 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
2023-11-16 10:03:13 -08:00
Ahtisham Shahid
c6b36a8558 feat: added beamer to edx-platform (#33701) 2023-11-16 14:56:08 +05:00
Kristin Aoki
cca1e9e365 fix: video drf 500 error (#33658) 2023-11-09 11:34:06 -05:00