Commit ebc37f1d by Alexander Kryklia

reset updates

parent 767f0bd4
...@@ -76,7 +76,7 @@ class PollModule(XModule): ...@@ -76,7 +76,7 @@ class PollModule(XModule):
'total': sum(self.poll_answers.values()) 'total': sum(self.poll_answers.values())
}) })
elif dispatch == 'reset_poll' and self.voted and \ elif dispatch == 'reset_poll' and self.voted and \
self.descriptor.xml_attributes.get('reset'): self.descriptor.xml_attributes.get('reset', 'True').lower() != 'false':
self.voted = False self.voted = False
# FIXME: fix this, when xblock will support mutable types. # FIXME: fix this, when xblock will support mutable types.
...@@ -86,7 +86,7 @@ class PollModule(XModule): ...@@ -86,7 +86,7 @@ class PollModule(XModule):
self.poll_answers = temp_poll_answers self.poll_answers = temp_poll_answers
self.poll_answer = '' self.poll_answer = ''
return json.dumps('success') return json.dumps({'status': 'success'})
else: # return error message else: # return error message
return json.dumps({'error': 'Unknown Command!'}) return json.dumps({'error': 'Unknown Command!'})
......
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