Commit 81bfa46f by Vasyl Nakvasiuk

fix caching problem in conditional_module

parent 076926c4
......@@ -49,8 +49,6 @@ class ConditionalModule(XModule):
js_module_name = "Conditional"
css = {'scss': [resource_string(__name__, 'css/capa/display.scss')]}
contents = String(scope=Scope.content)
# Map
# key: <tag attribute in xml>
# value: <name of module attribute>
......@@ -61,6 +59,10 @@ class ConditionalModule(XModule):
'voted': 'voted' # poll_question attr
}
def __init__(self, *args, **kwargs):
XModule.__init__(self, *args, **kwargs)
self.contents = None
def _get_condition(self):
# Get first valid condition.
for xml_attr, attr_name in self.conditions_map.iteritems():
......
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