Commit a7b7fd52 by Chris Dodge

Support editing of metadata on Sequences

parent 1cd81a2a
% if metadata:
<section class="metadata_edit"> <section class="metadata_edit">
<h3>Metadata</h3> <h3>Metadata</h3>
<ul> <ul>
...@@ -6,3 +7,4 @@ ...@@ -6,3 +7,4 @@
% endfor % endfor
</ul> </ul>
</section> </section>
% endif
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
</ul> </ul>
</section> </section>
<%include file="metadata-edit.html" />
<div class="content"> <div class="content">
<section class="modules"> <section class="modules">
<ol> <ol>
......
...@@ -9,6 +9,7 @@ from xmodule.x_module import XModule ...@@ -9,6 +9,7 @@ from xmodule.x_module import XModule
from xmodule.progress import Progress from xmodule.progress import Progress
from xmodule.exceptions import NotFoundError from xmodule.exceptions import NotFoundError
from pkg_resources import resource_string from pkg_resources import resource_string
from .editing_module import EditingDescriptor
log = logging.getLogger("mitx.common.lib.seq_module") log = logging.getLogger("mitx.common.lib.seq_module")
...@@ -94,7 +95,8 @@ class SequenceModule(XModule): ...@@ -94,7 +95,8 @@ class SequenceModule(XModule):
'element_id': self.location.html_id(), 'element_id': self.location.html_id(),
'item_id': self.id, 'item_id': self.id,
'position': self.position, 'position': self.position,
'tag': self.location.category} 'tag': self.location.category
}
self.content = self.system.render_template('seq_module.html', params) self.content = self.system.render_template('seq_module.html', params)
self.rendered = True self.rendered = True
...@@ -109,7 +111,7 @@ class SequenceModule(XModule): ...@@ -109,7 +111,7 @@ class SequenceModule(XModule):
return new_class return new_class
class SequenceDescriptor(MakoModuleDescriptor, XmlDescriptor): class SequenceDescriptor(EditingDescriptor, XmlDescriptor):
mako_template = 'widgets/sequence-edit.html' mako_template = 'widgets/sequence-edit.html'
module_class = SequenceModule module_class = SequenceModule
......
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