From e9dacfae092166658df97d56922eabb8ea5b9144 Mon Sep 17 00:00:00 2001 From: Vasyl Nakvasiuk Date: Thu, 28 Feb 2013 20:07:59 +0200 Subject: [PATCH] remove `self.contents` from `ConditionalModule` --- common/lib/xmodule/xmodule/conditional_module.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/common/lib/xmodule/xmodule/conditional_module.py b/common/lib/xmodule/xmodule/conditional_module.py index 72e596954b..8e1290400f 100644 --- a/common/lib/xmodule/xmodule/conditional_module.py +++ b/common/lib/xmodule/xmodule/conditional_module.py @@ -59,10 +59,6 @@ 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(): @@ -119,11 +115,7 @@ class ConditionalModule(XModule): context) return json.dumps({'html': [html], 'message': bool(message)}) - if self.contents is None: - self.contents = [child.get_html() for child in - self.get_display_items()] - - html = self.contents + html = [child.get_html() for child in self.get_display_items()] return json.dumps({'html': html})