From d6430570527d9d2ae9af85b32259d2ffab43e8a9 Mon Sep 17 00:00:00 2001 From: ichuang Date: Tue, 4 Sep 2012 11:21:18 -0400 Subject: [PATCH] count all types of modules, not just childless ones --- lms/djangoapps/instructor/views.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lms/djangoapps/instructor/views.py b/lms/djangoapps/instructor/views.py index 96acd66e8e..92b2401216 100644 --- a/lms/djangoapps/instructor/views.py +++ b/lms/djangoapps/instructor/views.py @@ -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)