Commit fe29b523 by Dean Dieker

Merge branch 'mchang/acceptance-testing' of https://github.com/MITx/mitx into…

Merge branch 'mchang/acceptance-testing' of https://github.com/MITx/mitx into mchang/acceptance-testing
parents 38352d89 96aab62c
......@@ -64,6 +64,31 @@ def get_courseware(course_id):
courseware = [ {'chapter_name':c.display_name, 'sections':[s.display_name for s in c.get_children()]} for c in chapters]
return courseware
def get_courseware_with_tabs(course_id):
"""
Given a course_id (string), return a courseware array of dictionaries for the
top three levels of navigation. Same as get_courseware() except include
the tabs on the right hand main navigation page.
Example:
[
{'chapter_name': 'Overview',
'sections': ['Welcome', 'System Usage Sequence', 'Lab0: Using the tools', 'Circuit Sandbox']
},
{'chapter_name': 'Week 1',
'sections': ['Administrivia and Circuit Elements', 'Basic Circuit Analysis', 'Resistor Divider', 'Week 1 Tutorials']
},
{'chapter_name': 'Midterm Exam',
'sections': ['Midterm Exam']
}
]
"""
course = get_course_by_id(course_id)
chapters = course.get_children()
courseware = [ {'chapter_name':c.display_name, 'sections':[s.display_name for s in c.get_children()]} for c in chapters]
return courseware
## course listing step
@step(u'I should see all courses')
def i_should_see_all_courses(step):
......
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