Skip to content

Instantly share code, notes, and snippets.

@antoviaque
Created March 6, 2014 21:22
Show Gist options
  • Select an option

  • Save antoviaque/9399956 to your computer and use it in GitHub Desktop.

Select an option

Save antoviaque/9399956 to your computer and use it in GitHub Desktop.
diff --git a/cms/envs/common.py b/cms/envs/common.py
index 9bba1f9..b914239 100644
--- a/cms/envs/common.py
+++ b/cms/envs/common.py
@@ -34,8 +34,7 @@ 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 only_xmodules
-from xmodule.x_module import XModuleMixin
+from xmodule.x_module import XModuleMixin, prefer_xmodules
from dealer.git import git
############################ FEATURE CONFIGURATION #############################
@@ -223,15 +222,10 @@ X_FRAME_OPTIONS = 'ALLOW'
# once the responsibility of XBlock creation is moved out of modulestore - cpennington
XBLOCK_MIXINS = (LmsBlockMixin, CmsBlockMixin, InheritanceMixin, XModuleMixin)
-# Only allow XModules in Studio
-XBLOCK_SELECT_FUNCTION = only_xmodules
-
-# Use the following lines to allow any xblock in Studio,
-# either by uncommenting them here, or adding them to your private.py
+# Allow any XBlock in Studio
# You should also enable the ALLOW_ALL_ADVANCED_COMPONENTS feature flag, so that
# xblocks can be added via advanced settings
-# from xmodule.modulestore import prefer_xmodules
-# XBLOCK_SELECT_FUNCTION = prefer_xmodules
+XBLOCK_SELECT_FUNCTION = prefer_xmodules
############################ SIGNAL HANDLERS ################################
# This is imported to register the exception signal handling that logs exceptions
@@ -473,6 +467,9 @@ INSTALLED_APPS = (
# for course creator table
'django.contrib.admin',
+ # XBlocks containing migrations
+ 'mentoring',
+
# for managing course modes
'course_modes',
diff --git a/lms/envs/common.py b/lms/envs/common.py
index 1b8ebb3..38d7677 100644
--- a/lms/envs/common.py
+++ b/lms/envs/common.py
@@ -34,8 +34,7 @@ from .discussionsettings import *
from lms.lib.xblock.mixin import LmsBlockMixin
from xmodule.modulestore.inheritance import InheritanceMixin
-from xmodule.x_module import XModuleMixin
-from xmodule.modulestore import only_xmodules
+from xmodule.x_module import XModuleMixin, prefer_xmodules
################################### FEATURES ###################################
# The display name of the platform to be used in templates/emails/etc.
@@ -439,13 +438,8 @@ DOC_STORE_CONFIG = {
# once the responsibility of XBlock creation is moved out of modulestore - cpennington
XBLOCK_MIXINS = (LmsBlockMixin, InheritanceMixin, XModuleMixin)
-# Only allow XModules in the LMS
-XBLOCK_SELECT_FUNCTION = only_xmodules
-
-# Use the following lines to allow any xblock in the LMS,
-# either by uncommenting them here, or adding them to your private.py
-# from xmodule.modulestore import prefer_xmodules
-# XBLOCK_SELECT_FUNCTION = prefer_xmodules
+# Allow any XBlock in the LMS
+XBLOCK_SELECT_FUNCTION = prefer_xmodules
#################### Python sandbox ############################################
@@ -712,6 +706,10 @@ MIDDLEWARE_CLASSES = (
'contentserver.middleware.StaticContentServer',
'crum.CurrentRequestUserMiddleware',
+ # Adds user tags to tracking events
+ # Must go before TrackMiddleware, to get the context set up
+ 'user_api.middleware.UserTagsEventContextMiddleware',
+
'django.contrib.messages.middleware.MessageMiddleware',
'track.middleware.TrackMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
@@ -1168,6 +1166,9 @@ INSTALLED_APPS = (
'reverification',
'embargo',
+
+ # XBlocks containing migrations
+ 'mentoring',
)
######################### MARKETING SITE ###############################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment