diff --git a/cms/envs/bok_choy.py b/cms/envs/bok_choy.py index 2218fed90e..b088ccd880 100644 --- a/cms/envs/bok_choy.py +++ b/cms/envs/bok_choy.py @@ -16,8 +16,6 @@ os.environ['SERVICE_VARIANT'] = 'bok_choy' os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname() #pylint: disable=E1120 from .aws import * # pylint: disable=W0401, W0614 -from xmodule.modulestore import prefer_xmodules - ######################### Testing overrides #################################### @@ -49,8 +47,5 @@ for log_name, log_level in LOG_OVERRIDES: # Use the auto_auth workflow for creating users and logging them in FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] = True -# Enable XBlocks -XBLOCK_SELECT_FUNCTION = prefer_xmodules - # Unfortunately, we need to use debug mode to serve staticfiles DEBUG = True diff --git a/cms/envs/common.py b/cms/envs/common.py index e9f5455080..03c1df3c22 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -34,9 +34,6 @@ from path import path from lms.lib.xblock.mixin import LmsBlockMixin from cms.lib.xblock.mixin import CmsBlockMixin -from xmodule.modulestore.inheritance import InheritanceMixin -from xmodule.modulestore import prefer_xmodules -from xmodule.x_module import XModuleMixin from dealer.git import git ############################ FEATURE CONFIGURATION ############################# @@ -220,6 +217,11 @@ X_FRAME_OPTIONS = 'ALLOW' ############# XBlock Configuration ########## +# Import after sys.path fixup +from xmodule.modulestore.inheritance import InheritanceMixin +from xmodule.modulestore import prefer_xmodules +from xmodule.x_module import XModuleMixin + # This should be moved into an XBlock Runtime/Application object # once the responsibility of XBlock creation is moved out of modulestore - cpennington XBLOCK_MIXINS = (LmsBlockMixin, CmsBlockMixin, InheritanceMixin, XModuleMixin) diff --git a/cms/envs/test.py b/cms/envs/test.py index b48ba2787b..64887e312c 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -16,7 +16,6 @@ from .common import * import os from path import path from warnings import filterwarnings -from xmodule.modulestore import prefer_xmodules # Nose Test Runner TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' @@ -158,10 +157,6 @@ INSTALLED_APPS += ('external_auth', ) filterwarnings('ignore', message='No request passed to the backend, unable to rate-limit') -################################# XBLOCK ###################################### -XBLOCK_SELECT_FUNCTION = prefer_xmodules - - ################################# CELERY ###################################### CELERY_ALWAYS_EAGER = True diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index afeb08d1d5..177bbdcdc4 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -4,8 +4,6 @@ Settings for bok choy tests import os from path import path -from xmodule.modulestore import prefer_xmodules - CONFIG_ROOT = path(__file__).abspath().dirname() #pylint: disable=E1120 TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" @@ -60,8 +58,5 @@ LOG_OVERRIDES = [ for log_name, log_level in LOG_OVERRIDES: logging.getLogger(log_name).setLevel(log_level) -# Enable XBlocks -XBLOCK_SELECT_FUNCTION = prefer_xmodules - # Unfortunately, we need to use debug mode to serve staticfiles DEBUG = True diff --git a/lms/envs/common.py b/lms/envs/common.py index 1d20f2c83e..41c52c58a7 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -34,9 +34,6 @@ from path import path from .discussionsettings import * from lms.lib.xblock.mixin import LmsBlockMixin -from xmodule.modulestore.inheritance import InheritanceMixin -from xmodule.modulestore import prefer_xmodules -from xmodule.x_module import XModuleMixin ################################### FEATURES ################################### # The display name of the platform to be used in templates/emails/etc. @@ -433,6 +430,11 @@ DOC_STORE_CONFIG = { ############# XBlock Configuration ########## +# Import after sys.path fixup +from xmodule.modulestore.inheritance import InheritanceMixin +from xmodule.modulestore import prefer_xmodules +from xmodule.x_module import XModuleMixin + # This should be moved into an XBlock Runtime/Application object # once the responsibility of XBlock creation is moved out of modulestore - cpennington XBLOCK_MIXINS = (LmsBlockMixin, InheritanceMixin, XModuleMixin)