Commit 9135358d by Jonathan Piacenti

Fixed a bug where the tally wasn't being updated.

parent 6083cf31
......@@ -227,9 +227,8 @@ class PollBlock(XBlock):
return result
self.choice = choice
tally = self.tally.copy()
tally[choice] = self.tally.get(choice, 0)
self.tally = tally
running_total = self.tally.get(choice, 0)
self.tally[choice] = running_total + 1
# Let the LMS know the user has answered the poll.
self.runtime.publish(self, 'progress', {})
result['success'] = True
......
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