Make ioi16 related files cleaner

This commit is contained in:
cuom1999 2023-01-02 17:22:45 -06:00
parent e10a8aca5c
commit 07d5ad2216
14 changed files with 145 additions and 92 deletions

View file

@ -3,7 +3,7 @@
{% include "problem/left-sidebar.html" %}
{% endblock %}
{% set in_ioi16 = request.in_contest_mode and request.participation.contest.format_name == "ioi16" %}
{% set has_hidden_subtasks = request.in_contest_mode and request.participation.contest.format.has_hidden_subtasks %}
{% block middle_content %}
<div id="content-left" class="problems">
@ -11,7 +11,7 @@
<thead>
<tr>
{% if request.in_contest_mode %}
{% if request.user.is_authenticated and not in_ioi16 %}
{% if request.user.is_authenticated and not has_hidden_subtasks %}
<th class="solved"><i class="fa fa-check"></i></th>
{% endif %}
<th class="problem">{{ _('Problem') }}</th>
@ -20,7 +20,7 @@
<th>{{ _('Types') }}</th>
{% endif %}
<th class="points">{{ _('Points') }}</th>
{% if not in_ioi16 %}
{% if not has_hidden_subtasks %}
<th class="users">{{ _('Users') }}</th>
{% endif %}
{% else %}
@ -64,7 +64,7 @@
<tbody>
{% for problem in object_list %}
<tr>
{% if request.user.is_authenticated and not in_ioi16 %}
{% if request.user.is_authenticated and not has_hidden_subtasks %}
{% if problem.id in completed_problem_ids %}
<td solved="1">
<a href="{{ url('user_submissions', problem.code, request.user.username) }}">
@ -115,7 +115,7 @@
{% if not request.in_contest_mode %}
<td class="ac-rate">{{ problem.ac_rate|floatformat(0) }}%</td>
{% endif %}
{% if not in_ioi16 %}
{% if not has_hidden_subtasks %}
<td class="users">
<a href="{{ url('ranked_submissions', problem.code) }}">
{% if not request.in_contest_mode or not hide_contest_scoreboard %}