34 lines
887 B
HTML
34 lines
887 B
HTML
<%def name="make_chapter(chapter)">
|
|
<h3><a href="#">${chapter['name']}</a></h3>
|
|
|
|
<ul>
|
|
% for section in chapter['sections']:
|
|
<li
|
|
% if 'active' in section and section['active']:
|
|
class="active"
|
|
% endif
|
|
>
|
|
|
|
<a href='/courseware/${format_string(course_name)}/${format_string(chapter['name'])}/${format_string(section['name'])}'>
|
|
<p>${section['name']}</p>
|
|
|
|
<p class="subtitle">
|
|
${section['format']}
|
|
|
|
% if 'time' in section and section['time']!="":
|
|
(${int(section['time'])/60} min)
|
|
% endif
|
|
|
|
% if 'due' in section and section['due']!="":
|
|
due ${section['due']}
|
|
% endif
|
|
</p>
|
|
</a>
|
|
% endfor
|
|
</ul>
|
|
</%def>
|
|
|
|
% for chapter in toc:
|
|
${make_chapter(chapter)}
|
|
% endfor
|