Make html a RawDescriptor with a slightly different UI

This commit is contained in:
Calen Pennington
2012-06-29 16:06:23 -04:00
parent b7062ca5ca
commit 5b8c3dc1e4
2 changed files with 4 additions and 9 deletions

View File

@@ -33,8 +33,8 @@
</section>
</section>
<textarea name="" class="edit-box" rows="8" cols="40">${module.definition['data']}</textarea>
<div class="preview">${module.definition['data']}</div>
<textarea name="" class="edit-box" rows="8" cols="40">${data}</textarea>
<div class="preview">${data}</div>
<div class="actions wip">
<a href="" class="save-update">Save &amp; Update</a>

View File

@@ -2,8 +2,7 @@ import json
import logging
from xmodule.x_module import XModule
from xmodule.mako_module import MakoModuleDescriptor
from xmodule.xml_module import XmlDescriptor
from xmodule.raw_module import RawDescriptor
from lxml import etree
from pkg_resources import resource_string
@@ -19,7 +18,7 @@ class HtmlModule(XModule):
self.html = self.definition['data']['text']
class HtmlDescriptor(MakoModuleDescriptor, XmlDescriptor):
class HtmlDescriptor(RawDescriptor):
"""
Module for putting raw html in a course
"""
@@ -28,7 +27,3 @@ class HtmlDescriptor(MakoModuleDescriptor, XmlDescriptor):
js = {'coffee': [resource_string(__name__, 'js/module/html.coffee')]}
js_module = 'HTML'
@classmethod
def definition_from_xml(cls, xml_object, system):
return {'data': {'text': etree.tostring(xml_object)}}