{% extends 'base.html' %} {% block title %}{{ solution.task.name }}|решение{% endblock %} {% block links %} {% endblock %} {% load filters %} {% block scripts %} {% if can_edit %} function findGetParameter(parameterName) { var result = null, tmp = []; location.search .substr(1) .split("&") .forEach(function (item) { tmp = item.split("="); if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]); }); return result; } function next() { const solutions_request = findGetParameter('solutions'); const solutions = solutions_request.split(' '); const current = findGetParameter('id'); const current_index = solutions.findIndex((element) => element == current); if (current_index != solutions.length - 1) { var next_element = document.getElementById('next'); next_element.setAttribute('href', '/admin/solution?id=' + solutions[current_index + 1] + '&solutions=' + solutions_request); next_element.innerHTML = '->'; } } function previous() { const solutions_request = findGetParameter('solutions'); const solutions = solutions_request.split(' '); const current = findGetParameter('id'); const current_index = solutions.findIndex((element) => element == current); if (current_index != 0) { var next_element = document.getElementById('previous'); next_element.setAttribute('href', '/admin/solution?id=' + solutions[current_index - 1] + '&solutions=' + solutions_request); next_element.innerHTML = '<-'; } } function fillContent() { next(); previous(); } {% if can_edit %} function showHideTests() { var text = document.getElementById('tests_text'); var button = document.getElementById('tests_button'); text.hidden = !text.hidden; if (text.hidden) { button.textContent = 'Показать тесты'; } else { button.textContent = 'Скрыть тесты'; } } function showHideLog() { var text = document.getElementById('log_text'); var button = document.getElementById('log_button'); text.hidden = !text.hidden; if (text.hidden) { button.textContent = 'Показать лог'; } else { button.textContent = 'Скрыть лог'; } } function retest() { let del = confirm("Подтвердите перетест"); if (del) { const sols = findGetParameter('solutions'); const link = '/admin/retest?block_id={{ solution.task.block.id }}&solution_id={{ solution.id }}&next={% autoescape off %}{{ path }}?id={{ solution.id }}{% if current_page == 'admin' %}%26solutions={% endif %}{% endautoescape %}'{% if current_page == 'admin' %} + sols.replaceAll(' ', '%20'){% endif %}; window.location.href = link; } } {% endif %} {% endif %} {% endblock %} {% block onload %}{% if can_edit %}fillContent(){% endif %}{% endblock %} {% block content %}
Блок {{ solution.task.block.name }} {% if current_page == 'admin' %} | К посылкам | К рейтингу {% endif %}
Таск {{ solution.task.name }}
Студент {{ solution.userinfo.surname }} {{ solution.userinfo.name }} {{ solution.userinfo.middle_name }}
id решения
{% if can_edit %} {% endif %} {{ solution.id }} {% if can_edit %} {% endif %}
Результат {% if can_edit or solution.task.show_details %} {% else %} {% if solution.task.show_result %} {{ solution.result }} {% else %} Accepted {% endif %} {% endif %}
Оценка {% if can_edit %} {% csrf_token %} {% else %} {% if solution.task.show_result %} {{ solution.mark_property }} {% else %} {% if solution.mark == null %} Checking {% else %} Checked {% endif %} {% endif %} {% endif %}
Комментарий {% if can_edit %} {% else %}
{{ solution.comment_property }}
{% endif %}
{% if can_edit %} {% endif %}

Files

{% for filename, text in solution.files.items %}
{{ filename }}
{% if filename|is_code %}

{{ text }}

{% else %}
{{ text }}
{% endif %}
{% endfor %} {% endblock %}