From 3856257e80e5a6e32a6d5e7c3e9c4f509b1c9bcb Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Sun, 2 Mar 2014 07:16:27 -0400 Subject: [PATCH 1/2] xblock-mentoring: Add repository to requirements & installed apps Adding to installed Django applications is required due to the use of a Django model by the XBlock --- cms/envs/common.py | 3 +++ lms/envs/common.py | 3 +++ requirements/edx/edx-private.txt | 3 +++ 3 files changed, 9 insertions(+) diff --git a/cms/envs/common.py b/cms/envs/common.py index 588bdd7a41..f811def5ce 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -472,6 +472,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 cf6107f17c..1e79bad028 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1164,6 +1164,9 @@ INSTALLED_APPS = ( 'reverification', 'embargo', + + # XBlocks containing migrations + 'mentoring', ) ######################### MARKETING SITE ############################### diff --git a/requirements/edx/edx-private.txt b/requirements/edx/edx-private.txt index 34336dc001..34999f38ad 100644 --- a/requirements/edx/edx-private.txt +++ b/requirements/edx/edx-private.txt @@ -1 +1,4 @@ +# Requirements for edx.org that aren't necessarily needed for Open edX. + -e git+ssh://git@github.com/jazkarta/edX-jsdraw.git@df9d048e331a642193e5aa2e03650fb84a9d715f#egg=edx-jsdraw +-e git+https://github.com/gsehub/xblock-mentoring.git@69a546eadeb4d038f6851bb54286c6c6fdbe8c87#egg=xblock-mentoring From 0864d57588f798f9249894b8ad3f5269fc83a647 Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Wed, 5 Mar 2014 10:38:32 -0400 Subject: [PATCH 2/2] Activate XBlocks by default in LMS & Studio --- cms/envs/common.py | 11 +++-------- lms/envs/common.py | 11 +++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/cms/envs/common.py b/cms/envs/common.py index f811def5ce..7452b2c5da 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -34,7 +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.x_module import XModuleMixin, only_xmodules +from xmodule.x_module import XModuleMixin, prefer_xmodules from dealer.git import git ############################ FEATURE CONFIGURATION ############################# @@ -222,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.x_module 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 diff --git a/lms/envs/common.py b/lms/envs/common.py index 1e79bad028..a64f77eafd 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -34,7 +34,7 @@ from .discussionsettings import * from lms.lib.xblock.mixin import LmsBlockMixin from xmodule.modulestore.inheritance import InheritanceMixin -from xmodule.x_module import XModuleMixin, only_xmodules +from xmodule.x_module import XModuleMixin, prefer_xmodules ################################### FEATURES ################################### # The display name of the platform to be used in templates/emails/etc. @@ -435,13 +435,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.x_module import prefer_xmodules -# XBLOCK_SELECT_FUNCTION = prefer_xmodules +# Allow any XBlock in the LMS +XBLOCK_SELECT_FUNCTION = prefer_xmodules #################### Python sandbox ############################################