Commit 6c86972e by Sven Marnach

Address a few minor review comments

parent 9c104d3b
......@@ -179,11 +179,7 @@ class PollBase(XBlock, ResourceMixin, PublishEventMixin):
"""
Checks to see if the user is permitted to vote. This may not be the case if they used up their max_submissions.
"""
if self.max_submissions == 0:
return True
if self.max_submissions > self.submissions_count:
return True
return False
return self.max_submissions == 0 or self.submissions_count < self.max_submissions
def can_view_private_results(self):
"""
......@@ -258,7 +254,7 @@ class PollBlock(PollBase):
has made changes to the answers.
"""
answers = dict(self.answers)
for key in answers.keys():
for key in answers:
if key not in self.tally:
self.tally[key] = 0
......
......@@ -5,7 +5,7 @@
{{#each tally}}
<li class="poll-result">
<div class="poll-result-input-container">
<input id="answer-{{key}}" type="radio" disabled {{#if choice}}checked="True"{{/if}} />
<input id="answer-{{key}}" type="radio" disabled {{#if choice}}checked{{/if}} />
</div>
{{#if any_img}}
<div class="poll-image result-image">
......
......@@ -40,7 +40,7 @@
</select>
</div>
<span class="tip setting-help">
If this is set True, don't display results of the poll to the user.
If this is set to True, don't display results of the poll to the user.
</span>
</li>
<li class="field comp-setting-entry is-set">
......
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