Make display_name defaulting explicit

This commit is contained in:
Calen Pennington
2013-03-08 14:58:04 -05:00
parent e4dea025d0
commit 93db5acc15
36 changed files with 102 additions and 83 deletions

View File

@@ -81,8 +81,8 @@ def get_courseware_with_tabs(course_id):
course = get_course_by_id(course_id)
chapters = [chapter for chapter in course.get_children() if not chapter.lms.hide_from_toc]
courseware = [{'chapter_name': c.display_name,
'sections': [{'section_name': s.display_name,
courseware = [{'chapter_name': c.display_name_with_default,
'sections': [{'section_name': s.display_name_with_default,
'clickable_tab_count': len(s.get_children()) if (type(s) == seq_module.SequenceDescriptor) else 0,
'tabs': [{'children_count': len(t.get_children()) if (type(t) == vertical_module.VerticalDescriptor) else 0,
'class': t.__class__.__name__}