Commit d6430570 by ichuang

count all types of modules, not just childless ones

parent 4f8161df
...@@ -345,10 +345,8 @@ def compute_course_stats(course): ...@@ -345,10 +345,8 @@ def compute_course_stats(course):
def walk(module): def walk(module):
children = module.get_children() children = module.get_children()
if not children: category = module.__class__.__name__ # HtmlDescriptor, CapaDescriptor, ...
category = module.__class__.__name__ # HtmlDescriptor, CapaDescriptor, ... counts[category] += 1
counts[category] += 1
return
for c in children: for c in children:
walk(c) walk(c)
......
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