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
3f44b3aa
Commit
3f44b3aa
authored
Dec 25, 2012
by
Alexander Kryklia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gst module docs
parent
1fb4c8c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
common/lib/xmodule/xmodule/gst_module.py
+9
-8
No files found.
common/lib/xmodule/xmodule/gst_module.py
View file @
3f44b3aa
...
...
@@ -8,7 +8,6 @@ import logging
from
lxml
import
etree
from
lxml
import
html
import
xmltodict
import
re
from
xmodule.mako_module
import
MakoModuleDescriptor
from
xmodule.xml_module
import
XmlDescriptor
...
...
@@ -71,17 +70,19 @@ class GraphicalSliderToolModule(XModule):
return
self
.
content
def
substitute_controls
(
self
,
html_string
):
""" Substitutes control elements via their divs.
TODO: change regexps to html parsing via beautiful soup or something
similar (aim : simpler support).
""" Substitutes control elements (slider, textbox and plot) in
html_string with their divs. Html_string is content of <render> tag
inside <graphical_slider_tool> tag. Documentation on how information in
<render> tag is organized and processed is located in:
mitx/docs/build/html/graphical_slider_tool.html.
Args:
html_string:
rendered html string with controls as xml tags
(<slider var="a"/>)
html_string:
content of <render> tag, with controls as xml tags,
e.g. <slider var="a"/>.
Returns:
html_string with control tags replaced by proper divs
(<slider var="a"/> -> <div class="....slider" > </div>)
html_string with control tags replaced by proper divs
(<slider var="a"/> -> <div class="....slider" > </div>)
"""
xml
=
html
.
fromstring
(
html_string
)
...
...
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