{% extends "course/base.html" %} {% block two_col_media %} {% endblock %} {% block js_media %} {% endblock %} {% block middle_content %}

{{title}}

{{_("About")}}

{{ course.about|markdown|reference|str|safe }}
{% if lessons %}

{{_("Lessons")}}

{% endif %} {% if course_contests %}

{{_("Contests")}}


{% for course_contest in course_contests %} {% set contest = course_contest.contest %} {% set progress = contest_progress[course_contest.id] %} {% endfor %}
{{_("Name")}} {{_("Start")}} {{_("End")}} {{_("Length")}} {{_("Score")}}
{{ contest.name }} {{ contest.start_time|date(_("H:i d/m/Y")) }}
{% if contest.time_before_start %} {{ _('Starting in %(countdown)s.', countdown=contest.start_time|as_countdown) }} {% endif %}
{{ contest.end_time|date(_("H:i d/m/Y"))}}
{% if contest.time_before_end %} {% trans countdown=contest.end_time|as_countdown %}Ends in {{ countdown }}{% endtrans %} {% endif %}
{% if contest.time_limit %} {% trans time_limit=contest.time_limit|timedelta('localized-no-seconds') %}{{ time_limit }}{% endtrans %} {% else %} {% trans duration=contest.contest_window_length|timedelta('localized-no-seconds') %}{{ duration }}{% endtrans %} {% endif %} {% if progress['total_points'] %} {{ (progress['achieved_points'] / progress['total_points'] * course_contest.points) | floatformat(1) }} / {{ course_contest.points }} {% else %} 0 / {{ course_contest.points }} {% endif %}
{% endif %}

{% set achieved_points = total_progress['achieved_points'] %} {% set total_points = total_progress['total_points'] %} {% set percentage = total_progress['percentage'] %} {{_("Total achieved points")}}: {{ achieved_points | floatformat(2) }} / {{ total_points }} ({{percentage|floatformat(1)}}%)

{% endblock %}