fix caching problem in conditional_module

This commit is contained in:
Vasyl Nakvasiuk
2013-02-27 18:34:09 +02:00
parent 076926c43a
commit 81bfa46f2e

View File

@@ -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():