Commit 26aa085d by Don Mitchell

Handle edge case when trying to aggregate progress in an empty sequence

parent 4a41ce80
...@@ -59,7 +59,7 @@ class SequenceModule(SequenceFields, XModule): ...@@ -59,7 +59,7 @@ class SequenceModule(SequenceFields, XModule):
# TODO: Cache progress or children array? # TODO: Cache progress or children array?
children = self.get_children() children = self.get_children()
progresses = [child.get_progress() for child in children] progresses = [child.get_progress() for child in children]
progress = reduce(Progress.add_counts, progresses) progress = reduce(Progress.add_counts, progresses, None)
return progress return progress
def handle_ajax(self, dispatch, data): # TODO: bounds checking def handle_ajax(self, dispatch, data): # TODO: bounds checking
......
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