Commit a1209e66 by Zia Fazal Committed by Jonathan Piacenti

ziafazal/fix-progress-avg-difference: remove orphan cout

parent 0a7d8ce8
......@@ -70,11 +70,13 @@ def get_course_leaf_nodes(course_key):
"""
nodes = []
detached_categories = getattr(settings, 'PROGRESS_DETACHED_CATEGORIES', [])
verticals = get_modulestore().get_items(course_key, qualifiers={'category': 'vertical'})
store = get_modulestore()
verticals = store.get_items(course_key, qualifiers={'category': 'vertical'})
orphans = store.get_orphans(course_key)
for vertical in verticals:
if hasattr(vertical, 'children'):
if hasattr(vertical, 'children') and vertical.location not in orphans:
nodes.extend([unit for unit in vertical.children
if getattr(unit, 'category') not in detached_categories])
if getattr(unit, 'category') not in detached_categories])
return nodes
......
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