{# This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for #} {# more information about the licensing of this file. #} {% set offset = offset | default("0", true) %} {% for section in sections %} {% if section.is_empty() %} {% with id="section_" + offset + "_" + (loop.index | string), title=section.get_title(), config=section.get_config(), level=level, hidden=False, display_subsections=False %} {% include "course_admin/task_dispensers/empty_section.html" %} {% endwith %} {% elif section.is_terminal() %} {% with id="section_" + offset + "_" + (loop.index | string) %} {% include "course_admin/task_dispensers/task_list.html" %} {% endwith %} {% else %}
{{ section.get_title() }} {% with tasks_list_option=False, sections_list_option=True %} {% include "course_admin/task_dispensers/section_menu.html" %} {% endwith %}
{% if config_fields %}
{% with section_config=section.get_config(), config_fields=config_fields %} {% include "course_admin/task_dispensers/section_config.html" %} {% endwith %}
{% endif %}
{% with sections=section.get_sections_list(),level=level+1, offset=offset + "_" + loop.index | string %} {% include "course_admin/task_dispensers/section.html" %} {% endwith %}
{% endif %} {% endfor %}