%def name="make_chapter(chapter)">
% for section in chapter['sections']:
-
${section['name']}
${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
% endfor
%def>
% for chapter in toc:
${make_chapter(chapter)}
% endfor