Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vmcj committed Aug 16, 2023
1 parent a66525f commit ee11fdd
Showing 1 changed file with 0 additions and 198 deletions.
198 changes: 0 additions & 198 deletions webapp/templates/jury/partials/submission_list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -280,204 +280,6 @@
{% endif %}
{%- endfor %}

</tbody>
<tbody>
{%- for submission in submissions %}
{%- if rejudging is defined %}
{%- set link = path('jury_submission', {submitId: submission.submitid, rejudgingid: rejudging.rejudgingid}) %}
{%- else %}
{%- set link = path('jury_submission', {submitId: submission.submitid}) %}
{%- endif %}

<tr class="{% if not submission.valid %}ignore{% endif %}"
data-problem-id="{{ submission.problem.probid }}"
data-team-id="{{ submission.team.teamid }}"
data-category-id="{{ submission.team.category.categoryid }}"
data-affiliation-id="{{ submission.team.affiliationId }}"
data-language-id="{{ submission.language.langid }}"
data-submission-id="{{ submission.submitid }}"
data-result="{{ submission | printValidJurySubmissionResult(false) }}">
{% if showExternalResult and showExternalTestcases %}
<td class="{{ tdExtraClass }}">
<a href="{{ link }}">
Local
</a>
</td>
{% endif %}
<td class="{{ tdExtraClass }}">
<a href="{{ link }}">
s{{ submission.submitid }}
{% if submission.externalid %}
({{ submission.externalid }})
{% endif %}
</a>
</td>
{%- if showContest %}
<td class="{{ tdExtraClass }}"><a href="{{ link }}">c{{ submission.contest.cid }}</a></td>
{%- endif %}

<td rowspan="{{ rowSpan }}" class="{{ tdExtraClass }}">
<a href="{{ link }}">{{ submission.submittime | printtime(null, submission.contest) }}</a>
</td>
<td rowspan="{{ rowSpan }}" class="{{ tdExtraClass }} entityButton">
<a href="{{ link }}">
{{ submission.team | entityIdBadge('t') }}
</a>
</td>
<td rowspan="{{ rowSpan }}" class="{{ tdExtraClass }}">
<a href="{{ link }}">
{{ submission.team.effectiveName | u.truncate(teamname_max_length, '') }}
</a>
</td>
<td class="probid{{ tdExtraClass }}" rowspan="{{ rowSpan }}">
<a href="{{ link }}"
title="{{ submission.problem.name }}">{{ submission.contestProblem | problemBadge }}</a>
</td>
<td class="langid{{ tdExtraClass }}" rowspan="{{ rowSpan }}">
<a href="{{ link }}"
title="{{ submission.language.name }}">{{ submission.language.langid }}</a>
</td>
{% if showExternalResult and showExternalTestcases %}
<td class="{{ tdExtraClass }}">
<a href="{{ link }}">
Local
</a>
</td>
{% endif %}
<td class="{{ tdExtraClass }}">
<a href="{{ link }}">
{{ submission | printValidJurySubmissionResult }}
</a>
</td>
{% if showExternalResult and not showExternalTestcases %}
{% if submission.externalJudgements.empty %}
{% set externalJudgement = null %}
{% else %}
{% set externalJudgement = submission.externalJudgements.first %}
{% endif %}
<td class="{{ tdExtraClass }}">
<a href="{{ link }}">
{% if submission.externalid is null %}
{{- 'n / a' | printValidJuryResult -}}
{% elseif externalJudgement is null or externalJudgement.result is empty %}
{{- 'pending' | printValidJuryResult -}}
{% else %}
{{- externalJudgement.result | printValidJuryResult -}}
{% endif %}
</a>
</td>
{% endif %}
{% if not showExternalResult or not showExternalTestcases %}
{%- set claim = false %}
{%- if submission.judgings.first is empty or submission.judgings.first.result is empty -%}
{%- set verified = '' %}
{%- set juryMember = '' %}
{%- else %}
{%- set juryMember = submission.judgings.first.juryMember %}
{%- if submission.judgings.first.verified %}
{%- set verified = 'yes' %}
{%- else %}
{%- set verified = 'no' %}
{%- if submission.judgings.first.juryMember is empty %}
{%- set claim = true %}
{%- else %}
{%- set verified = 'claimed' %}
{%- endif %}
{%- endif %}
{%- endif %}
{%- if claim %}
{%- set claimArg = {claim: 1} %}
{%- else %}
{%- set claimArg = {unclaim: 1} %}
{%- endif %}
<td class="{{ tdExtraClass }}"><a href="{{ link }}">{{ verified }}</a></td>
{% if not showExternalResult or not showExternalTestcases %}
<td class="{{ tdExtraClass }}">
{%- if rejudging is defined %}
{%- set claimLink = path('jury_submission', claimArg | merge({submitId: submission.submitid, rejudgingid: rejudging.rejudgingid})) %}
{%- else %}
{%- set claimLink = path('jury_submission', claimArg | merge({submitId: submission.submitid})) %}
{%- endif %}
{%- if claim -%}
<a class="btn btn-outline-secondary btn-sm"
href="{{ claimLink }}">claim</a>
{%- elseif (not submission.judgings.first or not submission.judgings.first.verified) and juryMember == app.user.username -%}
<a class="btn btn-info btn-sm" href="{{ claimLink }}">unclaim</a>
{%- else -%}
<a href="{{ link }}">{{ juryMember }}</a>
{%- endif -%}
</td>
{% endif %}
{% endif %}
{%- if rejudging is defined %}

<td class="{{ tdExtraClass }}"><a href="{{ path('jury_submission', {submitId: submission.submitid}) }}">
{{ submission.oldResult | printValidJuryResult }}
</a></td>
{%- endif %}
{%- if showTestcases is defined and showTestcases %}

<td class="testcase-results{{ tdExtraClass }}">
{{- submission | testcaseResults -}}
</td>
{%- endif %}

</tr>
{% if showExternalResult and showExternalTestcases %}
<tr>
{% if submission.externalJudgements.empty %}
{% set externalJudgement = null %}
{% else %}
{% set externalJudgement = submission.externalJudgements.first %}
{% endif %}
{% if external_ccs_submission_url is not empty %}
{% set externalSubmissionUrl = submission | externalCcsUrl %}
{% else %}
{% set externalSubmissionUrl = null %}
{% endif %}
<td rowspan="2">
<a {% if externalSubmissionUrl is not null %}href="{{ externalSubmissionUrl }}"{% endif %}>
External
</a>
</td>
<td rowspan="2">
<a {% if externalSubmissionUrl is not null %}href="{{ externalSubmissionUrl }}"{% endif %}>
{{ submission.externalid }}
</a>
</td>
<td>
<a {% if externalSubmissionUrl is not null %}href="{{ externalSubmissionUrl }}"{% endif %}>
External
</a>
</td>
<td>
<a {% if externalSubmissionUrl is not null %}href="{{ externalSubmissionUrl }}"{% endif %}>
{% if externalJudgement is null or externalJudgement.result is empty %}
{{- 'pending' | printValidJuryResult -}}
{% else %}
{{- externalJudgement.result | printValidJuryResult -}}
{% endif %}
</a>
</td>
<td class="testcase-results">
{{- submission | testcaseResults(true) -}}
</td>
</tr>
<tr>
<td colspan="3" class="inline-verify-form">
{% if externalJudgement is not null and (not submission.judgings.first or submission.judgings.first.result != externalJudgement.result) %}
{% include 'jury/partials/verify_form.html.twig' with {
label: 'Shadow difference verified',
judging: externalJudgement,
form_action: path('jury_shadow_difference_verify', {extjudgementid: externalJudgement.extjudgementid}),
show_form: true,
show_icat: false} %}
{% endif %}
</td>
</tr>
{% endif %}
{%- endfor %}

</tbody>
</table>
{% endif %}

0 comments on commit ee11fdd

Please sign in to comment.