Commit 7e7247d8 by kimth

Don't tabulate hidden chapters and sections in the Progress view

parent e89a7b67
...@@ -155,8 +155,18 @@ def progress_summary(student, course, grader, student_module_cache): ...@@ -155,8 +155,18 @@ def progress_summary(student, course, grader, student_module_cache):
chapters = [] chapters = []
# Don't include chapters that aren't displayable (e.g. due to error) # Don't include chapters that aren't displayable (e.g. due to error)
for c in course.get_display_items(): for c in course.get_display_items():
# Skip if the chapter is hidden
hidden = c.metadata.get('hide_from_toc','false')
if hidden == 'true':
continue
sections = [] sections = []
for s in c.get_display_items(): for s in c.get_display_items():
# Skip if the section is hidden
hidden = s.metadata.get('hide_from_toc','false')
if hidden == 'true':
continue
# Same for sections # Same for sections
graded = s.metadata.get('graded', False) graded = s.metadata.get('graded', False)
scores = [] scores = []
......
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