Commit 4b534788 by Calen Pennington Committed by Don Mitchell

Require markdown to be explicitly set

parent 8b597964
...@@ -142,11 +142,10 @@ def edit_unit(request, location): ...@@ -142,11 +142,10 @@ def edit_unit(request, location):
for category in COMPONENT_TYPES: for category in COMPONENT_TYPES:
component_class = XModuleDescriptor.load_class(category) component_class = XModuleDescriptor.load_class(category)
# add the default template # add the default template
has_markdown = hasattr(component_class, 'markdown') and component_class.markdown is not None
component_templates[category].append(( component_templates[category].append((
component_class.display_name.default or 'Blank', component_class.display_name.default or 'Blank',
category, category,
has_markdown, False, # No defaults have markdown (hardcoded current default)
None # no boilerplate for overrides None # no boilerplate for overrides
)) ))
# add boilerplates # add boilerplates
...@@ -175,7 +174,7 @@ def edit_unit(request, location): ...@@ -175,7 +174,7 @@ def edit_unit(request, location):
component_templates['advanced'].append(( component_templates['advanced'].append((
component_class.display_name.default or category, component_class.display_name.default or category,
category, category,
hasattr(component_class, 'markdown') and component_class.markdown is not None, False,
None # don't override default data None # don't override default data
)) ))
except PluginMissingError: except PluginMissingError:
......
...@@ -146,7 +146,7 @@ class CapaFields(object): ...@@ -146,7 +146,7 @@ class CapaFields(object):
values={"min": 0, "step": .1}, values={"min": 0, "step": .1},
scope=Scope.settings scope=Scope.settings
) )
markdown = String(help="Markdown source of this module", default="", scope=Scope.settings) markdown = String(help="Markdown source of this module", default=None, scope=Scope.settings)
source_code = String( source_code = String(
help="Source code for LaTeX and Word problems. This feature is not well-supported.", help="Source code for LaTeX and Word problems. This feature is not well-supported.",
scope=Scope.settings scope=Scope.settings
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment