Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show mismatch in expected result directly on submission page. #2178

Merged
merged 3 commits into from
Oct 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions webapp/templates/jury/submission.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,26 @@
</div>
{% endif %}

{% if selectedJudging is not null and selectedJudging.result is not empty %}
{% if selectedJudging.result|upper not in submission.expectedResults %}
<div class="alert alert-danger">
Actual result {{ selectedJudging.result | printValidJuryResult }} does NOT match expected result(s):
{% for expectedResult in submission.expectedResults %}
{{ expectedResult | printValidJuryResult }}
{% if not loop.last %}or{% endif %}
{% endfor %}.
</div>
{% elseif submission.expectedResults|length > 1 %}
<div class="alert alert-warning">
Actual result {{ selectedJudging.result | printValidJuryResult }} matches one of multiple expected results:
{% for expectedResult in submission.expectedResults %}
{{ expectedResult | printValidJuryResult }}
{% if not loop.last %}or{% endif %}
{% endfor %}.
</div>
{% endif %}
{% endif %}

<div class="mb-3">
<h1 style="display: inline;">
Submission {{ submission.submitid }}
Expand Down
Loading