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
22249c62
Commit
22249c62
authored
Sep 01, 2016
by
Braden MacDonald
Committed by
GitHub
Sep 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13 from arbrandes/SOL-1995
[SOL-1995] Ensure implicit row header cells use th elements
parents
482cbcb5
18d5f783
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
9 deletions
+16
-9
poll/public/css/poll.css
+6
-1
poll/public/css/themes/lms.css
+3
-1
poll/public/handlebars/survey_results.handlebars
+2
-2
poll/public/html/survey.html
+2
-2
tests/integration/studio_scenarios.py
+1
-1
tests/integration/test_defaults.py
+2
-2
No files found.
poll/public/css/poll.css
View file @
22249c62
...
...
@@ -146,7 +146,8 @@ li.poll-result .poll-image {
border-top
:
0
;
}
.survey-table
tr
:last-child
td
{
.survey-table
tbody
tr
:last-child
td
,
.survey-table
tbody
tr
:last-child
th
{
border-bottom
:
0
;
}
...
...
@@ -174,6 +175,10 @@ li.poll-result .poll-image {
background
:
none
!important
;
}
.survey-table
.survey-row
.survey-question
{
text-align
:
left
;
}
.survey-table
.survey-option
label
{
text-align
:
center
;
vertical-align
:
middle
;
...
...
poll/public/css/themes/lms.css
View file @
22249c62
...
...
@@ -17,13 +17,15 @@
font-size
:
1em
;
}
.themed-xblock.poll-block
.survey-row
td
{
.themed-xblock.poll-block
.survey-row
td
,
.themed-xblock.poll-block
.survey-row
th
{
padding-top
:
5px
;
padding-bottom
:
5px
;
}
/* LMS have very specific css selector that sets ~1.5em bottom margin */
.themed-xblock.poll-block
table
.survey-table
.survey-row
td
p
,
.themed-xblock.poll-block
table
.survey-table
.survey-row
th
p
,
.themed-xblock.poll-block
ul
.poll-answers
li
.poll-answer
.poll-answer
p
,
.themed-xblock.poll-block
ul
.poll-results
li
.poll-result
.poll-answer-label
p
{
margin-bottom
:
0
;
...
...
poll/public/handlebars/survey_results.handlebars
View file @
22249c62
...
...
@@ -11,14 +11,14 @@
<
/thead
>
{{#
each
tally
}}
<
tr
class
=
"survey-row"
>
<
t
d
class
=
"survey-question"
>
<
t
h
class
=
"survey-question"
>
{{#if
img
}}
<
div
class
=
"poll-image-td"
>
<
img
src
=
"
{{
img
}}
"
alt
=
"img_alt"
/>
<
/div
>
{{/if}}
{{{
label
}}}
<
/t
d
>
<
/t
h
>
{{#
each
answers
}}
<
td
class
=
"survey-percentage survey-option
{{#if
choice
}}
survey-choice
{{/if}}{{#if
top
}}
poll-top-choice
{{/if}}
"
>
{{
percent
}}
%<
/td
>
{{/
each
}}
...
...
poll/public/html/survey.html
View file @
22249c62
...
...
@@ -14,14 +14,14 @@
</thead>
{% for key, question in questions %}
<tr
class=
"survey-row"
>
<t
d
class=
"survey-question"
>
<t
h
class=
"survey-question"
>
{% if question.img %}
<div
class=
"poll-image-td"
>
<img
src=
"{{question.img}}"
alt=
"{{question.img_alt|default_if_none:''}}"
/>
</div>
{% endif %}
{{question.label|safe}}
</t
d
>
</t
h
>
{% for answer, label in answers %}
<td
class=
"survey-option"
>
<label>
...
...
tests/integration/studio_scenarios.py
View file @
22249c62
...
...
@@ -40,6 +40,6 @@ ddt_scenarios = [
'Survey Studio'
,
'question'
,
4
,
't
d
.survey-question'
't
h
.survey-question'
],
]
tests/integration/test_defaults.py
View file @
22249c62
...
...
@@ -73,8 +73,8 @@ class TestDefault(PollBaseTest):
# Should now be on the results page.
for
element
in
self
.
browser
.
find_elements_by_css_selector
(
'table > tr'
):
#
First element is question, second is first answer result
.
self
.
assertEqual
(
element
.
find_elements_by_css_selector
(
'td'
)[
1
]
.
text
,
'100
%
'
)
#
Questions are 'th', so the first 'td' is the first answer
.
self
.
assertEqual
(
element
.
find_elements_by_css_selector
(
'td'
)[
0
]
.
text
,
'100
%
'
)
# No feedback section.
self
.
assertRaises
(
NoSuchElementException
,
self
.
browser
.
find_element_by_css_selector
,
'.poll-feedback'
)
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