Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
d87fb3cd
Commit
d87fb3cd
authored
Aug 12, 2016
by
Ehtesham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solution div accessibility
parent
9e5a1d69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
common/lib/capa/capa/customrender.py
+15
-3
common/lib/capa/capa/templates/solutionspan.html
+0
-3
No files found.
common/lib/capa/capa/customrender.py
View file @
d87fb3cd
...
...
@@ -88,12 +88,24 @@ class SolutionRenderer(object):
def
__init__
(
self
,
system
,
xml
):
self
.
system
=
system
self
.
xml
=
xml
self
.
id
=
xml
.
get
(
'id'
)
def
get_html
(
self
):
context
=
{
'id'
:
self
.
id
}
html
=
self
.
system
.
render_template
(
"solutionspan.html"
,
context
)
return
etree
.
XML
(
html
)
solution
=
self
.
xml
solution
.
tag
=
'div'
solution_div
=
solution
[
0
]
solution_div
.
set
(
'id'
,
'solution_'
+
self
.
id
)
# set solution heading if we have it
if
len
(
solution_div
.
findall
(
'*'
))
>
1
:
header
=
solution_div
[
0
]
# explicitly set to h4
if
header
.
tag
==
'p'
:
header
.
tag
=
'h4'
header
.
set
(
'class'
,
'problem-summary-header'
)
return
solution
registry
.
register
(
SolutionRenderer
)
...
...
common/lib/capa/capa/templates/solutionspan.html
deleted
100644 → 0
View file @
9e5a1d69
<section
class=
"solution-span"
>
<span
id=
"solution_${id}"
></span>
</section>
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