Commit 81dd5041 by Calen Pennington

Add a couple of comments

parent 1a50052e
...@@ -20,12 +20,15 @@ def SequenceModule(XModule, ResourceTemplateModule): ...@@ -20,12 +20,15 @@ def SequenceModule(XModule, ResourceTemplateModule):
def student_view(self): def student_view(self):
return self.render_template( return self.render_template(
'main', 'main',
# Render w/ no arguments executes the same view for the children
# that is currently rendering for the parent
children=[child.render() for child in self.children] children=[child.render() for child in self.children]
) )
@xmodule.register_handler('update_position') @xmodule.register_handler('update_position')
def update_position(self, data): def update_position(self, data):
new_position = self.children[data['position']].id new_position = self.children[data['position']].id
# Updates to the state dictionary are transparently saved to the db
self.state['position'] = new_position self.state['position'] = new_position
self.state['visited'] = self.visited.union(new_position) self.state['visited'] = self.visited.union(new_position)
self.update_progress() self.update_progress()
......
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