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

This commit is contained in:
Chris Dodge
2012-09-21 15:49:07 -04:00
parent 03fbacd4e1
commit a3bf3fb1ca
2 changed files with 4 additions and 2 deletions

View File

@@ -31,7 +31,9 @@ class MakoModuleDescriptor(XModuleDescriptor):
"""
Return the context to render the mako template with
"""
return {'module': self}
return {'module': self,
'metadata': self.metadata
}
def get_html(self):
return self.system.render_template(

View File

@@ -112,7 +112,7 @@ class SequenceModule(XModule):
return new_class
class SequenceDescriptor(EditingDescriptor, XmlDescriptor):
class SequenceDescriptor(MakoModuleDescriptor, XmlDescriptor):
mako_template = 'widgets/sequence-edit.html'
module_class = SequenceModule