2024-04-27 01:37:35 +00:00
|
|
|
{% set can_view = submission.is_accessible_by(profile, check_contest=False) or is_in_editable_contest %}
|
2024-04-12 06:51:57 +00:00
|
|
|
<div class="sub-user-img user-img">
|
2024-04-14 05:23:14 +00:00
|
|
|
<img loading="lazy" src="{{gravatar(submission.user)}}">
|
2020-01-21 06:35:58 +00:00
|
|
|
</div>
|
2024-02-03 04:23:05 +00:00
|
|
|
<div class="sub-details">
|
|
|
|
<div class="sub-info{% if submission.status == 'G' %} sub-info-grading{% endif %}">
|
2024-02-08 18:57:06 +00:00
|
|
|
<div class="sub-user" style="max-width: {{50 if show_problem else 100}}%">
|
|
|
|
{{ link_user(submission.user) }}
|
|
|
|
</div>
|
2024-02-03 04:23:05 +00:00
|
|
|
{% if show_problem %}
|
|
|
|
<span>—</span>
|
2024-02-08 18:57:06 +00:00
|
|
|
<div class="sub-problem"><a href="{{ url('problem_detail', submission.problem.code) }}">{{ problem_name }}</a></div>
|
2024-02-03 04:23:05 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="sub-result">
|
|
|
|
<div class="state {{ submission._result_class if in_hidden_subtasks_contest else submission.result_class }}">
|
|
|
|
{% if in_hidden_subtasks_contest and submission.is_graded %}
|
|
|
|
<span>
|
|
|
|
{% set ns = namespace(is_first=False) %}
|
|
|
|
{% for batch in submission.batches %}
|
|
|
|
{% if batch.id %}
|
|
|
|
{{ '+' if ns.is_first else '' }}
|
|
|
|
{% set ns.is_first = True %}
|
|
|
|
<span class={{'green' if batch.AC else 'red'}}>
|
|
|
|
{{ batch.points|floatformat(0) }}
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</span>
|
|
|
|
{% else %}
|
|
|
|
{% if not in_hidden_subtasks_contest or submission.status in ('IE', 'CE', 'AB') %}
|
|
|
|
<span title="{{ submission.long_status }}" class="status">{{ submission.short_status }}</span>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<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>
|
|
|
|
{% if submission.status == 'G' and not in_hidden_subtasks_contest %}
|
|
|
|
<span class="sub-testcase">
|
|
|
|
{%- if submission.current_testcase > 0 -%}
|
|
|
|
{{ _('%(point)s / #%(case)s', point=submission.points|floatformat(1), case=submission.current_testcase-1) }}
|
|
|
|
{%- endif -%}
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
|
|
|
{%- endif -%}
|
|
|
|
</div>
|
|
|
|
<div class="language">
|
|
|
|
{{ submission.language.short_display_name }}
|
|
|
|
</div>
|
|
|
|
<span class="time">{{ relative_time(submission.date, format=_("d/m/Y"))}}</span>
|
2023-01-27 23:11:10 +00:00
|
|
|
{% if not request.in_contest_mode and submission.contest_object_id %}
|
|
|
|
<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>
|
2020-01-21 06:35:58 +00:00
|
|
|
{% endif %}
|
2023-01-27 23:11:10 +00:00
|
|
|
</div>
|
2020-01-21 06:35:58 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="sub-usage">
|
2023-01-27 23:11:10 +00:00
|
|
|
{% if submission.status in ('QU', 'P', 'G', 'CE', 'IE', 'AB') or in_hidden_subtasks_contest %}
|
|
|
|
<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>
|
2020-01-21 06:35:58 +00:00
|
|
|
{% else %}
|
2023-01-27 23:11:10 +00:00
|
|
|
<div class="time">---</div>
|
2020-01-21 06:35:58 +00:00
|
|
|
{% endif %}
|
2023-01-27 23:11:10 +00:00
|
|
|
<div class="memory">{{ (submission.memory_bytes|filesizeformat(True)).replace('i', '') }}</div>
|
|
|
|
{% endif %}
|
2024-02-03 04:23:05 +00:00
|
|
|
{% 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 %}
|
2023-01-03 04:38:25 +00:00
|
|
|
</div>
|