Commit f2fd649a by Valera Rozuvan Committed by Alexander Kryklia

Removed unnecessary XML section. Documenting.

parent 3e46ecef
...@@ -97,8 +97,6 @@ class GraphicalSliderToolModule(XModule): ...@@ -97,8 +97,6 @@ class GraphicalSliderToolModule(XModule):
number, then only error message is displayed. number, then only error message is displayed.
Sliders and numbers are optional. Plot is required.--> Sliders and numbers are optional. Plot is required.-->
</configuration> </configuration>
<plot_code>
</plot_code>
</graphical_slider_tool> </graphical_slider_tool>
</vertical> </vertical>
</sequential> </sequential>
...@@ -116,8 +114,7 @@ class GraphicalSliderToolModule(XModule): ...@@ -116,8 +114,7 @@ class GraphicalSliderToolModule(XModule):
'gst_html': gst_html, 'gst_html': gst_html,
'element_id': self.html_id, 'element_id': self.html_id,
'element_class': self.html_class, 'element_class': self.html_class,
'configuration_json': self.configuration_json, 'configuration_json': self.configuration_json
'plot_code': self.definition['plot_code']
} }
self.content = (self.system.render_template( self.content = (self.system.render_template(
'graphical_slider_tool.html', params)) 'graphical_slider_tool.html', params))
...@@ -195,7 +192,7 @@ class GraphicalSliderToolDescriptor(MakoModuleDescriptor, XmlDescriptor): ...@@ -195,7 +192,7 @@ class GraphicalSliderToolDescriptor(MakoModuleDescriptor, XmlDescriptor):
dict dict
""" """
# check for presense of required tags in xml # check for presense of required tags in xml
expected_children_level_0 = ['render', 'configuration', 'plot_code'] expected_children_level_0 = ['render', 'configuration']
for child in expected_children_level_0: for child in expected_children_level_0:
if len(xml_object.xpath(child)) != 1: if len(xml_object.xpath(child)) != 1:
raise ValueError("Self a\ssessment definition must include \ raise ValueError("Self a\ssessment definition must include \
...@@ -214,8 +211,7 @@ class GraphicalSliderToolDescriptor(MakoModuleDescriptor, XmlDescriptor): ...@@ -214,8 +211,7 @@ class GraphicalSliderToolDescriptor(MakoModuleDescriptor, XmlDescriptor):
return { return {
'render': parse('render'), 'render': parse('render'),
'configuration': xml_object.xpath('configuration')[0], 'configuration': xml_object.xpath('configuration')[0]
'plot_code': parse('plot_code'),
} }
def definition_to_xml(self, resource_fs): def definition_to_xml(self, resource_fs):
......
...@@ -4,11 +4,6 @@ ...@@ -4,11 +4,6 @@
${configuration_json} ${configuration_json}
</div> </div>
<!-- hidden field to read configuration json from -->
<div class="${element_class}" id="${element_id}_plot_code" style="display: none;">
${plot_code}
</div>
<!-- main xml with marked places for sliders, numbers, and plot --> <!-- main xml with marked places for sliders, numbers, and plot -->
${gst_html} ${gst_html}
</div> </div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment