{# This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for #}
{# more information about the licensing of this file. #}
{% extends "layout.html" %}
{% block title %}{{ course.get_name(user_manager.session_language()) }}{% endblock %}
{% block head %}
{{ super() }}
{% endblock %}
{% block column %}
{{ template_helper.call('course_admin_menu',course=course,current='stats') | safe }}
{% endblock %}
{% set is_admin = user_manager.has_admin_rights_on_course(course) %}
{% block navbar %}
{% endblock %}
{% block content %}
{# The number of decimal digits. (10 for 1 decimal, 100 for two decimals, ...) #}
{% set accuracy = 10 %}
{% set val_displayed_total = ((v_total*accuracy)|int)/accuracy %}
{% set val_displayed_best = ((v_best*accuracy)|int)/accuracy %}
{# If the displayed value is 0 but in fact the value is not 0 (e.g. 0.00001), we display the '>' character because we need to know that there is at least one tag True. #}
{% if val_displayed_total == 0 and v_total != 0 %}
{% set val_displayed_total = "> " + str(val_displayed_total) %}
{% endif %}
{% if val_displayed_best == 0 and v_best != 0 %}
{% set val_displayed_best = "> " + str(val_displayed_best) %}
{% endif %}