count all types of modules, not just childless ones

This commit is contained in:
ichuang
2012-09-04 11:21:18 -04:00
parent 4f8161df84
commit d643057052

View File

@@ -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)