Minor cleanup of Studio settings: removing extra indirection, and advanced components list

This commit is contained in:
Piotr Mitros
2016-01-14 10:03:09 -05:00
parent c9933a5878
commit 6b6248b44a
7 changed files with 26 additions and 110 deletions

View File

@@ -330,7 +330,6 @@ ADVANCED_SECURITY_CONFIG = ENV_TOKENS.get('ADVANCED_SECURITY_CONFIG', {})
################ ADVANCED COMPONENT/PROBLEM TYPES ###############
ADVANCED_COMPONENT_TYPES = ENV_TOKENS.get('ADVANCED_COMPONENT_TYPES', ADVANCED_COMPONENT_TYPES)
ADVANCED_PROBLEM_TYPES = ENV_TOKENS.get('ADVANCED_PROBLEM_TYPES', ADVANCED_PROBLEM_TYPES)
DEPRECATED_ADVANCED_COMPONENT_TYPES = ENV_TOKENS.get(
'DEPRECATED_ADVANCED_COMPONENT_TYPES', DEPRECATED_ADVANCED_COMPONENT_TYPES

View File

@@ -18,6 +18,21 @@ Longer TODO:
just means that we stick them in a dict called FEATURES.
3. We need to handle configuration for multiple courses. This could be as
multiple sites, but we do need a way to map their data assets.
When refering to XBlocks, we use the entry-point name. For example,
| setup(
| name='xblock-foobar',
| version='0.1',
| packages=[
| 'foobar_xblock',
| ],
| entry_points={
| 'xblock.v1': [
| 'foobar-block = foobar_xblock:FoobarBlock',
| # ^^^^^^^^^^^^ This is the one you want.
| ]
| },
| )
"""
# We intentionally define lots of variables that aren't used, and
@@ -92,10 +107,6 @@ FEATURES = {
# whether to use password policy enforcement or not
'ENFORCE_PASSWORD_POLICY': False,
# If set to True, Studio won't restrict the set of advanced components
# to just those pre-approved by edX
'ALLOW_ALL_ADVANCED_COMPONENTS': False,
# Turn off account locking if failed login attempts exceeds a limit
'ENABLE_MAX_FAILED_LOGIN_ATTEMPTS': False,
@@ -357,9 +368,6 @@ XBLOCK_MIXINS = (
AuthoringMixin,
)
# 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
XBLOCK_SELECT_FUNCTION = prefer_xmodules
############################ Modulestore Configuration ################################
@@ -982,75 +990,6 @@ ENTRANCE_EXAM_MIN_SCORE_PCT = 50
### Default language for a new course
DEFAULT_COURSE_LANGUAGE = "en"
################ ADVANCED_COMPONENT_TYPES ###############
# These strings are entry-point names from the setup.py of the XBlock.
# For example:
#
# setup(
# name='xblock-foobar',
# version='0.1',
# packages=[
# 'foobar_xblock',
# ],
# entry_points={
# 'xblock.v1': [
# 'foobar-block = foobar_xblock:FoobarBlock',
# # ^^^^^^^^^^^^ This is the one you want.
# ]
# },
# )
#
# To use this block, add 'foobar-block' to the ADVANCED_COMPONENT_TYPES list.
ADVANCED_COMPONENT_TYPES = [
'annotatable',
'textannotation', # module for annotating text (with annotation table)
'videoannotation', # module for annotating video (with annotation table)
'imageannotation', # module for annotating image (with annotation table)
'word_cloud',
'lti',
'lti_consumer',
'library_content',
'edx_sga',
'problem-builder',
'pb-dashboard',
'poll',
'survey',
'activetable',
'vectordraw',
# Some of the XBlocks from pmitros repos are sometimes prototypes.
# Use with caution.
'concept', # Concept mapper. See https://github.com/pmitros/ConceptXBlock
'done', # Lets students mark things as done. See https://github.com/pmitros/DoneXBlock
'audio', # Embed an audio file. See https://github.com/pmitros/AudioXBlock
'recommender', # Crowdsourced recommender. Prototype by dli&pmitros. Intended for roll-out in one place in one course.
'profile', # Prototype user profile XBlock. Used to test XBlock parameter passing. See https://github.com/pmitros/ProfileXBlock
'rate', # Allows up-down voting of course content. See https://github.com/pmitros/RateXBlock
'split_test',
'notes',
'schoolyourself_review',
'schoolyourself_lesson',
# Office Mix
'officemix',
# Google Drive embedded components. These XBlocks allow one to
# embed public google drive documents and calendars within edX units
'google-document',
'google-calendar',
# Oppia block
'oppia',
# In-course reverification checkpoint
'edx-reverification-block',
# Peer instruction tool
'ubcpi',
]
# Adding components in this list will disable the creation of new problem for
# those components in Studio. Existing problems will work fine and one can edit
# them in Studio.
@@ -1058,9 +997,7 @@ DEPRECATED_ADVANCED_COMPONENT_TYPES = []
# Specify XBlocks that should be treated as advanced problems. Each entry is a
# dict:
# 'component': the entry-point name of the XBlock. See the comment for
# ADVANCED_COMPONENT_TYPES for details of where to find this
# name.
# 'component': the entry-point name of the XBlock.
# 'boilerplate_name': an optional YAML template to be used. Specify as
# None to omit.
#

View File

@@ -55,11 +55,6 @@ DJFS = {
'url_root': '/static/djpyfs',
}
############################# ADVANCED COMPONENTS #############################
# Make it easier to test advanced components in local dev
FEATURES['ALLOW_ALL_ADVANCED_COMPONENTS'] = True
################################# CELERY ######################################
# By default don't use a worker, execute tasks as if they were local functions