ModulestoreEnum class.
This commit is contained in:
@@ -6,7 +6,7 @@ from staticfiles import finders
|
||||
from django.conf import settings
|
||||
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore import XML_MODULESTORE_TYPE
|
||||
from xmodule.modulestore import ModuleStoreEnum
|
||||
from xmodule.contentstore.content import StaticContent
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -119,7 +119,9 @@ def replace_static_urls(text, data_directory, course_id=None, static_asset_path=
|
||||
if settings.DEBUG and finders.find(rest, True):
|
||||
return original
|
||||
# if we're running with a MongoBacked store course_namespace is not None, then use studio style urls
|
||||
elif (not static_asset_path) and course_id and modulestore().get_modulestore_type(course_id) != XML_MODULESTORE_TYPE:
|
||||
elif (not static_asset_path) \
|
||||
and course_id \
|
||||
and modulestore().get_modulestore_type(course_id) != ModuleStoreEnum.Type.xml:
|
||||
# first look in the static file pipeline and see if we are trying to reference
|
||||
# a piece of static content which is in the edx-platform repo (e.g. JS associated with an xmodule)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user