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
d9a5b9c4
Commit
d9a5b9c4
authored
Nov 04, 2016
by
Braden MacDonald
Committed by
GitHub
Nov 04, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #17 from mckinseyacademy/mcka-copy-changes
Mcka copy changes
parents
3cef87b9
a07513ed
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
15 deletions
+9
-15
poll/public/html/poll.html
+2
-3
poll/public/html/survey.html
+2
-2
poll/public/js/poll.js
+1
-3
setup.py
+1
-1
tests/integration/test_private_results.py
+3
-6
No files found.
poll/public/html/poll.html
View file @
d9a5b9c4
...
@@ -30,12 +30,11 @@
...
@@ -30,12 +30,11 @@
{% endfor %}
{% endfor %}
</ul>
</ul>
</div>
</div>
<input
class=
"input-main"
type=
"button"
name=
"poll-submit"
<input
class=
"input-main"
type=
"button"
name=
"poll-submit"
value=
"Submit"
disabled
/>
value=
"{% if choice %}Resubmit{% else %}Submit{% endif %}"
disabled
/>
</form>
</form>
<div
class=
"poll-voting-thanks
<div
class=
"poll-voting-thanks
{% if not choice or can_vote %}poll-hidden{% endif %}"
>
{% if not choice or can_vote %}poll-hidden{% endif %}"
>
<span>
Thank you
for your submission!
</span>
<span>
Thank you
.
</span>
</div>
</div>
<div
class=
"poll-submissions-count poll-hidden"
>
<div
class=
"poll-submissions-count poll-hidden"
>
You have used
<span
class=
"poll-current-count"
>
{{ submissions_count }}
</span>
You have used
<span
class=
"poll-current-count"
>
{{ submissions_count }}
</span>
...
...
poll/public/html/survey.html
View file @
d9a5b9c4
...
@@ -37,9 +37,9 @@
...
@@ -37,9 +37,9 @@
</tr>
</tr>
{% endfor %}
{% endfor %}
</table>
</table>
<input
class=
"input-main"
type=
"button"
name=
"poll-submit"
value=
"
{% if choices and can_vote %}Resubmit{% else %}Submit{% endif %}
"
disabled
/>
<input
class=
"input-main"
type=
"button"
name=
"poll-submit"
value=
"
Submit
"
disabled
/>
</form>
</form>
<div
class=
"poll-voting-thanks{% if not choices or can_vote %} poll-hidden{% endif %}"
><span>
Thank you
for your submission!
</span></div>
<div
class=
"poll-voting-thanks{% if not choices or can_vote %} poll-hidden{% endif %}"
><span>
Thank you
.
</span></div>
<div
class=
"poll-submissions-count poll-hidden"
>
<div
class=
"poll-submissions-count poll-hidden"
>
You have used
<span
class=
"poll-current-count"
>
{{ submissions_count }}
</span>
You have used
<span
class=
"poll-current-count"
>
{{ submissions_count }}
</span>
out of
<span
class=
"poll-max-submissions"
>
{{ max_submissions }}
</span>
submissions.
out of
<span
class=
"poll-max-submissions"
>
{{ max_submissions }}
</span>
submissions.
...
...
poll/public/js/poll.js
View file @
d9a5b9c4
...
@@ -158,9 +158,7 @@ function PollUtil (runtime, element, pollType) {
...
@@ -158,9 +158,7 @@ function PollUtil (runtime, element, pollType) {
thanks
.
removeClass
(
'poll-hidden'
);
thanks
.
removeClass
(
'poll-hidden'
);
thanks
.
fadeOut
(
0
).
fadeIn
(
'slow'
,
'swing'
);
thanks
.
fadeOut
(
0
).
fadeIn
(
'slow'
,
'swing'
);
$
(
'.poll-feedback-container'
,
element
).
removeClass
(
'poll-hidden'
);
$
(
'.poll-feedback-container'
,
element
).
removeClass
(
'poll-hidden'
);
if
(
can_vote
)
{
if
(
!
can_vote
)
{
$
(
'input[name="poll-submit"]'
,
element
).
val
(
gettext
(
'Resubmit'
));
}
else
{
$
(
'input'
,
element
).
attr
(
'disabled'
,
true
)
$
(
'input'
,
element
).
attr
(
'disabled'
,
true
)
}
}
return
;
return
;
...
...
setup.py
View file @
d9a5b9c4
...
@@ -44,7 +44,7 @@ def package_data(pkg, roots):
...
@@ -44,7 +44,7 @@ def package_data(pkg, roots):
setup
(
setup
(
name
=
'xblock-poll'
,
name
=
'xblock-poll'
,
version
=
'1.2.
1
'
,
version
=
'1.2.
2
'
,
description
=
'An XBlock for polling users.'
,
description
=
'An XBlock for polling users.'
,
packages
=
[
packages
=
[
'poll'
,
'poll'
,
...
...
tests/integration/test_private_results.py
View file @
d9a5b9c4
...
@@ -87,12 +87,9 @@ class TestPrivateResults(PollBaseTest):
...
@@ -87,12 +87,9 @@ class TestPrivateResults(PollBaseTest):
submit
.
click
()
submit
.
click
()
self
.
wait_until_clickable
(
self
.
browser
.
find_element_by_css_selector
(
'.poll-voting-thanks'
))
self
.
wait_until_clickable
(
self
.
browser
.
find_element_by_css_selector
(
'.poll-voting-thanks'
))
self
.
assertIn
(
'Resubmit'
,
submit
.
get_attribute
(
'outerHTML'
),
'Resubmit'
)
self
.
assertIn
(
'Submit'
,
submit
.
get_attribute
(
'outerHTML'
))
# ^ Note that in previous versions, this text would change to "Resubmit",
# This should persist on page reload.
# but we removed that functionality in v1.2.2
self
.
go_to_page
(
page_name
)
submit
=
self
.
get_submit
()
self
.
assertIn
(
'Resubmit'
,
submit
.
get_attribute
(
'outerHTML'
),
'Resubmit'
)
@unpack
@unpack
@data
(
*
scenarios
)
@data
(
*
scenarios
)
...
...
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