Commit 6c86972e by Sven Marnach

Address a few minor review comments

parent 9c104d3b
...@@ -179,11 +179,7 @@ class PollBase(XBlock, ResourceMixin, PublishEventMixin): ...@@ -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. 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 self.max_submissions == 0 or self.submissions_count < self.max_submissions
return True
if self.max_submissions > self.submissions_count:
return True
return False
def can_view_private_results(self): def can_view_private_results(self):
""" """
...@@ -258,7 +254,7 @@ class PollBlock(PollBase): ...@@ -258,7 +254,7 @@ class PollBlock(PollBase):
has made changes to the answers. has made changes to the answers.
""" """
answers = dict(self.answers) answers = dict(self.answers)
for key in answers.keys(): for key in answers:
if key not in self.tally: if key not in self.tally:
self.tally[key] = 0 self.tally[key] = 0
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
{{#each tally}} {{#each tally}}
<li class="poll-result"> <li class="poll-result">
<div class="poll-result-input-container"> <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> </div>
{{#if any_img}} {{#if any_img}}
<div class="poll-image result-image"> <div class="poll-image result-image">
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</select> </select>
</div> </div>
<span class="tip setting-help"> <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> </span>
</li> </li>
<li class="field comp-setting-entry is-set"> <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