{% extends "coachreports/base.html" %} {% load i18n %} {% load staticfiles %} {% load my_filters %} {% block coachreports_active %}active{% endblock coachreports_active %} {% block title %}{% trans "Progress by topic" %} {{ block.super }}{% endblock title %} {% block headcss %}{{ block.super }} {% endblock headcss %} {% block headjs %}{{ block.super }} {% endblock headjs %} {% block content %} {% block navbar_title %}{{ block.super }}{% endblock navbar_title %}
{# Select the coach report type #} {% if report_types %}
{% trans "Select Report" %}
{% else %}
{% trans "No report types available." %}
{% endif %}
{% if users and request_report_type == "student" %}
{% trans "Select Student" %}
{% elif topics and groups %}
{% trans "Select Topic" %}
{% endif %}
{% trans "In Progress" %}
{% trans "Completed" %}
{% if request_report_type != "video" %}
{% trans "Struggling" %}
{% endif %}
{% if not students %}

{% if not groups.0.groups and not groups.1 and request.GET.topic %} {% comment %}No groups available: then "ungrouped" is selected, and "no students" returned.{% endcomment %} {% trans "No student accounts have been created." %} {% elif not request.GET.topic %} {% comment %}Group was selected, but data not queried because a topic was not selected (NOTE: this required knowledge of how the view queries data){% endcomment %} {% trans "Please select a topic above." %} {% else %} {% comment %}Everything specified, but no users fit the query.{% endcomment %} {% trans "No student accounts in this group have been created." %} {% endif %}

{% else %} {% block students_header %}
{% for student in students %} {% endfor %}
{% trans "Student" %}
{% endblock students_header %} {% if request_report_type == "exercise" and exercises %} {% block exercise_data %}
{% for exercise in exercises %} {% endfor %} {% for student in students %} {% for exercise in exercises %} {% if not student.exercise_logs|get_item:exercise.slug %} {% endfor %} {% endfor %}
{% elif student.exercise_logs|get_item:exercise.slug|get_item:"struggling" %} {% elif student.exercise_logs|get_item:exercise.slug|get_item:"complete" %} {% else %} {% endif %}
{% endblock exercise_data %} {% elif request_report_type == "video" and videos %} {% block video_data %}
{% for video in videos %} {% endfor %} {% for student in students %} {% for video in videos %} {% if not student.video_logs|get_item:video.id %} {% endfor %} {% endfor %}
  {% elif not student.video_logs|get_item:video.id|get_item:"complete" %}
{% blocktrans with total_seconds_watched=student.video_logs|get_item:video.id|get_item:"total_seconds_watched" %}{{ total_seconds_watched }} secs{% endblocktrans %}
{% else %}
100%
{% endif %} {% if student.video_logs|get_item:video.id %}
{% blocktrans with points=student.video_logs|get_item:video.id|get_item:"points" %}{{ points}} points{% endblocktrans %}
{% endif %}
{% endblock video_data %} {% endif %} {% endif %} {% endblock content %}