fix: use mako prefix lms. when XBlock runtime renders in Studio/authoring MFE

When the XBlock runtime is used in Studio/authoring mode, it needs to
use the template path prefix "lms." in order to locate the block
templates. (In LMS view, no prefix is required.)

Fixes bug introduced by https://github.com/openedx/edx-platform/pull/29354
and removes template workaround added by
https://github.com/openedx/edx-platform/pull/29517 (see Author Notes & Concerns)
This commit is contained in:
Jillian Vogel
2022-02-21 12:52:20 +10:30
parent 8b77638bf0
commit 732d8cb337
6 changed files with 11 additions and 246 deletions

View File

@@ -42,7 +42,8 @@ from lms.envs.test import ( # pylint: disable=wrong-import-order
REGISTRATION_EXTRA_FIELDS,
GRADES_DOWNLOAD,
SITE_NAME,
WIKI_ENABLED
WIKI_ENABLED,
XBLOCK_RUNTIME_V2_EPHEMERAL_DATA_CACHE,
)
@@ -177,6 +178,12 @@ CACHES = {
'course_structure_cache': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
},
'blockstore': {
'KEY_PREFIX': 'blockstore',
'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key',
'LOCATION': 'edx_loc_mem_cache',
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
},
}
############################### BLOCKSTORE #####################################
@@ -276,12 +283,6 @@ TEST_ELASTICSEARCH_USE_SSL = os.environ.get(
TEST_ELASTICSEARCH_HOST = os.environ.get('EDXAPP_TEST_ELASTICSEARCH_HOST', 'edx.devstack.elasticsearch710')
TEST_ELASTICSEARCH_PORT = int(os.environ.get('EDXAPP_TEST_ELASTICSEARCH_PORT', '9200'))
############################# TEMPLATE CONFIGURATION #############################
# Adds mako template dirs for content_libraries tests
MAKO_TEMPLATE_DIRS_BASE.append(
COMMON_ROOT / 'lib' / 'capa' / 'capa' / 'templates'
)
########################## AUTHOR PERMISSION #######################
FEATURES['ENABLE_CREATOR_GROUP'] = False