2020-01-21 06:35:58 +00:00
|
|
|
{% set can_view = submission_layout(submission, profile_id, request.user, editable_problem_ids, completed_problem_ids) %}
|
2022-12-29 04:50:26 +00:00
|
|
|
{% set hidden = submission.contest_object and submission.contest_object.format_name == "ioi16" and not request.user.is_superuser %}
|
|
|
|
{% if hidden %}
|
|
|
|
<div class="sub-result TLE">
|
|
|
|
<div class="score">
|
|
|
|
{%- if submission.is_graded -%}
|
|
|
|
??? / {{ submission.case_total|floatformat(0) }}
|
|
|
|
{%- else -%}
|
|
|
|
<i class="fa fa-spinner fa-pulse"></i>
|
|
|
|
{%- endif -%}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="state">
|
|
|
|
<span title="?" class="status">?</span> |
|
|
|
|
<span class="language">{{ submission.language.short_display_name }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
2020-01-21 06:35:58 +00:00
|
|
|
<div class="sub-result {{ submission.result_class }}">
|
|
|
|
<div class="score">
|
|
|
|
{%- if submission.is_graded -%}
|
|
|
|
{%- if submission.status in ('IE', 'CE', 'AB') -%}
|
|
|
|
---
|
|
|
|
{%- else -%}
|
|
|
|
{{ submission.case_points|floatformat(0) }} / {{ submission.case_total|floatformat(0) }}
|
|
|
|
{%- endif -%}
|
|
|
|
{%- else -%}
|
|
|
|
<i class="fa fa-spinner fa-pulse"></i>
|
|
|
|
{%- endif -%}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="state">
|
|
|
|
<span title="{{ submission.long_status }}" class="status">{{ submission.short_status }}</span> |
|
|
|
|
<span class="language">{{ submission.language.short_display_name }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-29 04:50:26 +00:00
|
|
|
{% endif %}
|
2020-01-21 06:35:58 +00:00
|
|
|
<div class="sub-info{% if submission.status == 'G' %} sub-info-grading{% endif %}">
|
|
|
|
{% if show_problem %}
|
|
|
|
<div class="name"><a href="{{ url('problem_detail', submission.problem.code) }}">{{ problem_name }}</a></div>
|
|
|
|
{% endif %}
|
|
|
|
<div>
|
|
|
|
{{ link_user(submission.user) }}
|
|
|
|
<span class="time">{{ relative_time(submission.date) }}</span>
|
2022-01-10 11:13:46 +00:00
|
|
|
{% if not request.in_contest_mode and submission.contest_object_id %}
|
2020-01-21 06:35:58 +00:00
|
|
|
<a href="{{ url('contest_view', submission.contest_object.key) }}"
|
|
|
|
class="submission-contest">
|
|
|
|
<i title="{{ submission.contest_object.name }}" class="fa fa-dot-circle-o"></i>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-12-29 04:50:26 +00:00
|
|
|
{% if submission.status == 'G' and not hidden %}
|
2020-01-21 06:35:58 +00:00
|
|
|
<div class="sub-testcase">
|
|
|
|
{%- if submission.current_testcase > 0 -%}
|
2020-07-19 21:27:14 +00:00
|
|
|
{{ _('Point %(point)s / Case #%(case)s', point=submission.points|floatformat(1), case=submission.current_testcase) }}
|
2020-01-21 06:35:58 +00:00
|
|
|
{%- else -%}
|
|
|
|
...
|
|
|
|
{%- endif -%}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if can_view %}
|
|
|
|
<div class="sub-prop"><div>
|
|
|
|
<a href="{{ url('submission_status', submission.id) }}">
|
|
|
|
<i class="fa fa-eye fa-fw"></i><span class="label">{{ _('view') }}</span>
|
|
|
|
</a>
|
|
|
|
{% if perms.judge.rejudge_submission %} ·
|
|
|
|
<a href="#" onclick="rejudge_submission({{ submission.id }}, event);return false">
|
|
|
|
<i class="fa fa-refresh fa-fw"></i><span class="label">{{ _('rejudge') }}</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if perms.judge.change_submission %} ·
|
|
|
|
<a href="{{ url('admin:judge_submission_change', submission.id) }}">
|
|
|
|
<i class="fa fa-cog fa-fw"></i><span class="label">{{ _('admin') }}</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</div></div>
|
|
|
|
{% endif %}
|
|
|
|
|
2022-12-29 04:50:26 +00:00
|
|
|
{% if hidden %}
|
|
|
|
<div class="sub-usage">
|
|
|
|
<div class="time">---</div>
|
|
|
|
<div class="memory">---</div>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
2020-01-21 06:35:58 +00:00
|
|
|
<div class="sub-usage">
|
|
|
|
{% if submission.status in ('QU', 'P', 'G', 'CE', 'IE', 'AB') %}
|
|
|
|
<div class="time">---</div>
|
|
|
|
<div class="memory">---</div>
|
|
|
|
{% else %}
|
|
|
|
{% if "TLE" != submission.result %}
|
|
|
|
<div title="{{ submission.time or 0 }}s" class="time">
|
|
|
|
{{ (submission.time or 0)|floatformat(2) }}s
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="time">---</div>
|
|
|
|
{% endif %}
|
|
|
|
{# No one actually like IEC prefixes, Jinja2. #}
|
|
|
|
<div class="memory">{{ (submission.memory_bytes|filesizeformat(True)).replace('i', '') }}</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2022-12-29 04:50:26 +00:00
|
|
|
{% endif %}
|