From 3f44b3aa2a9ea4af0a64222bcf985a48e655f138 Mon Sep 17 00:00:00 2001 From: Alexander Kryklia Date: Tue, 25 Dec 2012 18:47:41 +0200 Subject: [PATCH] gst module docs --- common/lib/xmodule/xmodule/gst_module.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/common/lib/xmodule/xmodule/gst_module.py b/common/lib/xmodule/xmodule/gst_module.py index 02040274c3..a6b0fb516b 100644 --- a/common/lib/xmodule/xmodule/gst_module.py +++ b/common/lib/xmodule/xmodule/gst_module.py @@ -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 tag + inside tag. Documentation on how information in + 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 - () + html_string: content of tag, with controls as xml tags, + e.g. . Returns: - html_string with control tags replaced by proper divs - ( ->
) + html_string with control tags replaced by proper divs + ( ->
) """ xml = html.fromstring(html_string)