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:
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user