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
def9b5ef
Commit
def9b5ef
authored
Jun 27, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use html safe IDs for sequences and videos
parent
34d68348
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
common/lib/keystore/__init__.py
+6
-0
common/lib/xmodule/seq_module.py
+1
-1
common/lib/xmodule/video_module.py
+1
-1
No files found.
common/lib/keystore/__init__.py
View file @
def9b5ef
...
...
@@ -113,6 +113,12 @@ class Location(object):
url
+=
"/"
+
self
.
revision
return
url
def
html_id
(
self
):
"""
Return a string with a version of the location that is safe for use in html id attributes
"""
return
"-"
.
join
(
str
(
v
)
for
v
in
self
.
list
()
if
v
is
not
None
)
def
list
(
self
):
"""
Return a list representing this location
...
...
common/lib/xmodule/seq_module.py
View file @
def9b5ef
...
...
@@ -67,7 +67,7 @@ class SequenceModule(XModule):
# of script, even if it occurs mid-string. Do this after json.dumps()ing
# so that we can be sure of the quotations being used
params
=
{
'items'
:
json
.
dumps
(
contents
)
.
replace
(
'</script>'
,
'<"+"/script>'
),
'element_id'
:
"-"
.
join
(
str
(
v
)
for
v
in
self
.
location
.
list
()
),
'element_id'
:
self
.
location
.
html_id
(
),
'item_id'
:
self
.
id
,
'position'
:
self
.
position
,
'tag'
:
self
.
location
.
category
}
...
...
common/lib/xmodule/video_module.py
View file @
def9b5ef
...
...
@@ -46,7 +46,7 @@ class VideoModule(XModule):
def
get_html
(
self
):
return
self
.
system
.
render_template
(
'video.html'
,
{
'streams'
:
self
.
video_list
(),
'id'
:
self
.
id
,
'id'
:
self
.
location
.
html_id
()
,
'position'
:
self
.
position
,
'name'
:
self
.
name
,
'annotations'
:
self
.
annotations
,
...
...
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