Commit 9135358d by Jonathan Piacenti

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

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