From f5dc0afa07ff7960637310b66f2a1bdd3c04aec7 Mon Sep 17 00:00:00 2001 From: Alexander Kryklia Date: Mon, 25 Feb 2013 12:54:56 +0200 Subject: [PATCH] fixed reset json --- common/lib/xmodule/xmodule/poll_module.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/poll_module.py b/common/lib/xmodule/xmodule/poll_module.py index 0178f02319..9c50274253 100644 --- a/common/lib/xmodule/xmodule/poll_module.py +++ b/common/lib/xmodule/xmodule/poll_module.py @@ -75,7 +75,8 @@ class PollModule(XModule): 'poll_answers': self.poll_answers, 'total': sum(self.poll_answers.values()) }) - elif dispatch == 'reset_poll' and self.voted: + elif dispatch == 'reset_poll' and self.voted and \ + self.descriptor.xml_attributes.get('reset'): self.voted = False # FIXME: fix this, when xblock will support mutable types. @@ -131,7 +132,7 @@ class PollModule(XModule): 'poll_answer': self.poll_answer, 'poll_answers': self.poll_answers if self.voted else {}, 'total': sum(self.poll_answers.values()) if self.voted else 0, - 'reset': self.descriptor.xml_attributes.get('reset', True)}) + 'reset': str(self.descriptor.xml_attributes.get('reset', 'true')).lower()}) class PollDescriptor(MakoModuleDescriptor, XmlDescriptor):