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
dba17ae1
Commit
dba17ae1
authored
Jan 25, 2017
by
Jillian Vogel
Committed by
GitHub
Jan 25, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21 from arizzitano/arizzitano/valid-id-attribute
[template] avoid potential invalid id attribute
parents
a5f3f764
c4994ead
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
poll/public/html/poll.html
+3
-3
poll/public/html/survey.html
+4
-4
setup.py
+1
-1
No files found.
poll/public/html/poll.html
View file @
dba17ae1
...
...
@@ -14,19 +14,19 @@
{% for key, value in answers %}
<div
class=
"poll-answer"
>
<div
class=
"poll-input-container"
>
<input
type=
"radio"
name=
"choice"
id=
"{{ block_id }}-answer-{{ key }}"
value=
"{{ key }}"
<input
type=
"radio"
name=
"choice"
id=
"
poll-
{{ block_id }}-answer-{{ key }}"
value=
"{{ key }}"
{%
if
choice =
=
key
%}
checked
{%
endif
%}
/>
</div>
{% if any_img %}
<div
class=
"poll-image"
>
<label
for=
"{{ block_id }}-answer-{{ key }}"
class=
"poll-image-label"
>
<label
for=
"
poll-
{{ block_id }}-answer-{{ key }}"
class=
"poll-image-label"
>
{% if value.img %}
<img
src=
"{{ value.img }}"
/>
{% endif %}
</label>
</div>
{% endif %}
<label
class=
"poll-answer-text"
for=
"{{ block_id }}-answer-{{ key }}"
>
{{ value.label|safe }}
</label>
<label
class=
"poll-answer-text"
for=
"
poll-
{{ block_id }}-answer-{{ key }}"
>
{{ value.label|safe }}
</label>
</div>
{% endfor %}
</div>
...
...
poll/public/html/survey.html
View file @
dba17ae1
...
...
@@ -9,13 +9,13 @@
<tr>
<td></td>
{% for answer, label in answers %}
<th
id=
"{{block_id}}-{{answer}}"
class=
"survey-answer"
>
{{label}}
</th>
<th
id=
"
poll-
{{block_id}}-{{answer}}"
class=
"survey-answer"
>
{{label}}
</th>
{% endfor %}
</tr>
</thead>
{% for key, question in questions %}
<tr
class=
"survey-row"
role=
"group"
aria-labelledby=
"{{block_id}}-{{key}}"
>
<th
id=
"{{block_id}}-{{key}}"
class=
"survey-question"
>
<tr
class=
"survey-row"
role=
"group"
aria-labelledby=
"
poll-
{{block_id}}-{{key}}"
>
<th
id=
"
poll-
{{block_id}}-{{key}}"
class=
"survey-question"
>
{% if question.img %}
<div
class=
"poll-image-td"
>
<img
src=
"{{question.img}}"
alt=
"{{question.img_alt|default_if_none:''}}"
/>
...
...
@@ -29,7 +29,7 @@
<input
type=
"radio"
name=
"{{key}}"
value=
"{{answer}}"
{%
if
question
.
choice =
=
answer
%}
checked
{%
endif
%}
aria-labelledby=
"{{block_id}}-{{answer}}"
aria-labelledby=
"
poll-
{{block_id}}-{{answer}}"
/>
</label>
</td>
...
...
setup.py
View file @
dba17ae1
...
...
@@ -44,7 +44,7 @@ def package_data(pkg, roots):
setup
(
name
=
'xblock-poll'
,
version
=
'1.2.
4
'
,
version
=
'1.2.
5
'
,
description
=
'An XBlock for polling users.'
,
packages
=
[
'poll'
,
...
...
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