% if blocks.get('children'):
    % for section in blocks.get('children'):
  1. ${ section['display_name'] }

      % for subsection in section.get('children', []):
    1. ## Subsection title ${ subsection['display_name'] }
      ## There are behavior differences between rendering of subsections which have ## exams (timed, graded, etc) and those that do not. ## ## Exam subsections expose exam status message field as well as a status icon <% if subsection.get('due') is None: # examples: Homework, Lab, etc. data_string = subsection.get('format') else: if 'special_exam_info' in subsection: data_string = _('due {date}') else: data_string = _("{subsection_format} due {{date}}").format(subsection_format=subsection.get('format')) %> % if subsection.get('format') or 'special_exam_info' in subsection: % if 'special_exam' in subsection: ## Display the exam status icon and status message ${subsection['special_exam_info'].get('short_description', '')} ## completed exam statuses should not show the due date ## since the exam has already been submitted by the user % if not subsection['special_exam_info'].get('in_completed_state', False): % endif % else: ## non-graded section, we just show the exam format and the due date ## this is the standard case in edx-platform % if 'graded' in subsection and subsection['graded']: ${_("This content is graded")} % endif % endif % endif
      ## Resume button (if last visited section) % if subsection['last_accessed']: ${ _("This is your last visited course section.") } ${ _("Resume Course") } %endif
    2. % endfor
  2. % endfor
% endif