Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-poll
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
xblock-poll
Commits
6c86972e
Commit
6c86972e
authored
Jun 05, 2015
by
Sven Marnach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address a few minor review comments
parent
9c104d3b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
poll/poll.py
+2
-6
poll/public/handlebars/poll_results.handlebars
+1
-1
poll/public/html/poll_edit.html
+1
-1
No files found.
poll/poll.py
View file @
6c86972e
...
...
@@ -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
...
...
poll/public/handlebars/poll_results.handlebars
View file @
6c86972e
...
...
@@ -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"
>
...
...
poll/public/html/poll_edit.html
View file @
6c86972e
...
...
@@ -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"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment