Commit d4532e4f by Xavier Antoviaque

Merge pull request #5 from FiloSottile/port_studio

Use the enforce_type feature to parse the bools
parents 92585717 2d950484
...@@ -85,8 +85,6 @@ class LightChildrenMixin(XBlockWithChildrenFragmentsMixin): ...@@ -85,8 +85,6 @@ class LightChildrenMixin(XBlockWithChildrenFragmentsMixin):
cls.add_node_as_child(block, xml_child, child_id) cls.add_node_as_child(block, xml_child, child_id)
for name, value in attr: for name, value in attr:
if value == "false": value = False
if value == "true": value = True
setattr(block, name, value) setattr(block, name, value)
return block return block
......
...@@ -65,8 +65,8 @@ class MentoringBlock(XBlockWithLightChildren): ...@@ -65,8 +65,8 @@ class MentoringBlock(XBlockWithLightChildren):
url_name = String(help="Name of the current step, used for URL building", url_name = String(help="Name of the current step, used for URL building",
default='mentoring-default', scope=Scope.content) default='mentoring-default', scope=Scope.content)
enforce_dependency = Boolean(help="Should the next step be the current block to complete?", enforce_dependency = Boolean(help="Should the next step be the current block to complete?",
default=True, scope=Scope.content) default=True, scope=Scope.content, enforce_type=True)
display_submit = Boolean(help="Allow to submit current block?", default=True, scope=Scope.content) display_submit = Boolean(help="Allow to submit current block?", default=True, scope=Scope.content, enforce_type=True)
xml_content = String(help="XML content", default='', scope=Scope.content) xml_content = String(help="XML content", default='', scope=Scope.content)
has_children = True has_children = True
icon_class = 'problem' icon_class = 'problem'
......
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