% if course_sections is not None:
    % for section in course_sections: <% section_is_auto_opened = section.get('resume_block') is True %>
    1. % for subsection in section.get('children', []): <% gated_subsection = subsection['id'] in gated_content completed_prereqs = gated_content[subsection['id']]['completed_prereqs'] if gated_subsection else False subsection_is_auto_opened = subsection.get('resume_block') is True %>
    2. % if gated_subsection and not completed_prereqs: % if gated_subsection and not completed_prereqs: % endif % if not gated_subsection or (gated_subsection and completed_prereqs):
        % for vertical in subsection.get('children', []): <% vertical_is_access_denied = vertical.get('authorization_denial_reason') if vertical_is_access_denied: continue %>
      1. ${ vertical['display_name'] }
        % if vertical.get('complete'): % endif
      2. % endfor
      % endif
    3. % endfor
  1. % endfor
% endif