% if course_sections is not None:
    % for section in course_sections: <% section_is_auto_opened = section.get('resume_block') is True scored = 'scored' if section.get('scored', False) else '' %>
    1. % for subsection in section.get('children', []): <% gated_subsection = subsection['id'] in gated_content needs_prereqs = not gated_content[subsection['id']]['completed_prereqs'] if gated_subsection else False scored = 'scored' if subsection.get('scored', False) else '' graded = 'graded' if subsection.get('graded') else '' num_graded_problems = subsection.get('num_graded_problems', 0) due_date = subsection.get('due') overdue = due_date is not None and due_date < timezone.now() and not subsection.get('complete', True) %> % if overdue and not reset_deadlines_banner_displayed: <% reset_deadlines_banner_displayed = True %> % endif
    2. % if num_graded_problems: % endif

      ${ subsection['display_name'] } % if num_graded_problems: ${ngettext("({number} Question)", "({number} Questions)", num_graded_problems).format(number=num_graded_problems)} % endif

      % if subsection.get('complete'): ${_("Completed")} % endif % if needs_prereqs:
      ${ _("Prerequisite: ") } <% prerequisite_id = gated_content[subsection['id']]['prerequisite'] prerequisite_name = xblock_display_names.get(prerequisite_id) %> ${ prerequisite_name }
      % endif
      ## 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 or (self_paced and not in_edx_when): # examples: Homework, Lab, etc. data_string = subsection.get('format') data_datetime = "" else: if 'special_exam_info' in subsection: data_string = _('due {date}') else: data_string = _("{subsection_format} due {{date}}").format(subsection_format=subsection.get('format')) data_datetime = subsection.get('due') %> % 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 subsection.get('graded'):  ${_("This content is graded")} % endif % endif % endif
    3. % endfor
  1. % endfor
% endif