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>
46 lines
1.3 KiB
Python
46 lines
1.3 KiB
Python
"""
|
|
Django settings for use when generating API documentation.
|
|
Basically the LMS devstack settings plus a few items needed to successfully
|
|
import all the Studio code.
|
|
"""
|
|
|
|
|
|
import os
|
|
|
|
from openedx.core.lib.derived import derive_settings
|
|
|
|
from lms.envs.common import * # lint-amnesty, pylint: disable=wildcard-import
|
|
from cms.envs.common import ( # lint-amnesty, pylint: disable=unused-import
|
|
ADVANCED_PROBLEM_TYPES,
|
|
COURSE_IMPORT_EXPORT_STORAGE,
|
|
GIT_EXPORT_DEFAULT_IDENT,
|
|
LIBRARY_AUTHORING_MICROFRONTEND_URL,
|
|
SCRAPE_YOUTUBE_THUMBNAILS_JOB_QUEUE,
|
|
VIDEO_TRANSCRIPT_MIGRATIONS_JOB_QUEUE,
|
|
UPDATE_SEARCH_INDEX_JOB_QUEUE,
|
|
FRONTEND_REGISTER_URL,
|
|
)
|
|
|
|
# Turn on all the boolean feature flags, so that conditionally included
|
|
# API endpoints will be found.
|
|
for key, value in FEATURES.items():
|
|
if value is False:
|
|
FEATURES[key] = True
|
|
|
|
# Settings that will fail if we enable them, and we don't need them for docs anyway.
|
|
FEATURES['RUN_AS_ANALYTICS_SERVER_ENABLED'] = False
|
|
FEATURES['ENABLE_SOFTWARE_SECURE_FAKE'] = False
|
|
FEATURES['ENABLE_MKTG_SITE'] = False
|
|
|
|
INSTALLED_APPS.extend([
|
|
'cms.djangoapps.contentstore.apps.ContentstoreConfig',
|
|
'cms.djangoapps.course_creators',
|
|
'cms.djangoapps.xblock_config.apps.XBlockConfig',
|
|
'lms.djangoapps.lti_provider',
|
|
])
|
|
|
|
|
|
COMMON_TEST_DATA_ROOT = ''
|
|
|
|
derive_settings(__name__)
|