Commit d6430570 by ichuang

count all types of modules, not just childless ones

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