Commit 706fd99c by Victor Shnayder

Address comments on #394

parent ecffe3e0
...@@ -227,7 +227,7 @@ class XModule(HTMLSnippet): ...@@ -227,7 +227,7 @@ class XModule(HTMLSnippet):
def get_display_items(self): def get_display_items(self):
''' '''
Returns a list of descendent module instances that will display Returns a list of descendent module instances that will display
immediately inside this module immediately inside this module.
''' '''
items = [] items = []
for child in self.get_children(): for child in self.get_children():
...@@ -238,7 +238,7 @@ class XModule(HTMLSnippet): ...@@ -238,7 +238,7 @@ class XModule(HTMLSnippet):
def displayable_items(self): def displayable_items(self):
''' '''
Returns list of displayable modules contained by this module. If this Returns list of displayable modules contained by this module. If this
module is visible, should return [self] module is visible, should return [self].
''' '''
return [self] return [self]
......
...@@ -145,15 +145,11 @@ def progress_summary(student, course, grader, student_module_cache): ...@@ -145,15 +145,11 @@ def progress_summary(student, course, grader, student_module_cache):
instance_modules for the student instance_modules for the student
""" """
chapters = [] chapters = []
for c in course.get_children(): # Don't include chapters that aren't displayable (e.g. due to error)
# Don't include chapters that aren't displayable (e.g. due to error) for c in course.get_display_items():
if c not in c.displayable_items():
continue
sections = [] sections = []
for s in c.get_children(): for s in c.get_display_items():
# Same for sections # Same for sections
if s not in s.displayable_items():
continue
graded = s.metadata.get('graded', False) graded = s.metadata.get('graded', False)
scores = [] scores = []
for module in yield_module_descendents(s): for module in yield_module_descendents(s):
......
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