Commit 706d7191 by Chris Dodge

Put SequenceDescriptor back as a subclass of MakeModuleDescriptor. THe previous…

Put SequenceDescriptor back as a subclass of MakeModuleDescriptor. THe previous change to have it derive from EditorDescriptor was not safe as EditorDescriptor presumes that there is a edit box in the JS save flows. So we need to edit get_context() on MakoModuleDescriptor to also pass along the metadata to the Mako rendering templates
parent eb1c6542
...@@ -31,7 +31,9 @@ class MakoModuleDescriptor(XModuleDescriptor): ...@@ -31,7 +31,9 @@ class MakoModuleDescriptor(XModuleDescriptor):
""" """
Return the context to render the mako template with Return the context to render the mako template with
""" """
return {'module': self} return {'module': self,
'metadata': self.metadata
}
def get_html(self): def get_html(self):
return self.system.render_template( return self.system.render_template(
......
...@@ -112,7 +112,7 @@ class SequenceModule(XModule): ...@@ -112,7 +112,7 @@ class SequenceModule(XModule):
return new_class return new_class
class SequenceDescriptor(EditingDescriptor, XmlDescriptor): class SequenceDescriptor(MakoModuleDescriptor, 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