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):
for category in COMPONENT_TYPES:
component_class = XModuleDescriptor.load_class(category)
# add the default template
has_markdown = hasattr(component_class, 'markdown') and component_class.markdown is not None
component_templates[category].append((
component_class.display_name.default or 'Blank',
category,
has_markdown,
False, # No defaults have markdown (hardcoded current default)
None # no boilerplate for overrides
))
# add boilerplates
......@@ -175,7 +174,7 @@ def edit_unit(request, location):
component_templates['advanced'].append((
component_class.display_name.default or category,
category,
hasattr(component_class, 'markdown') and component_class.markdown is not None,
False,
None # don't override default data
))
except PluginMissingError:
......
......@@ -146,7 +146,7 @@ class CapaFields(object):
values={"min": 0, "step": .1},
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(
help="Source code for LaTeX and Word problems. This feature is not well-supported.",
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