mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-05 15:10:16 +02:00
18a6090366
* Add Penalty Seconds on tests * Refactors and start of candidate answer relation * Add breadcrumbs and UI consistency updates across backoffice templates * Add breadcrumbs and UI consistency updates across backoffice templates * Add Dutch translations for email verification and security messages * Rector * Refactor for code consistency and type safety assertions across repositories and entities * Refactor candidate-related logic to optimize queries, improve template separation, and add "Answer Mapping" functionality. * Cleanup * Update Symfony * Add coderabbit config * Fixes from coderabbit
78 lines
3.9 KiB
Twig
78 lines
3.9 KiB
Twig
<h4 class="mb-3">{{ 'Score'|trans }}</h4>
|
|
<div class="btn-toolbar mb-3" role="toolbar">
|
|
<div class="btn-group me-2">
|
|
{# <a class="btn btn-primary">{{ 'Start Elimination'|trans }}</a> #}
|
|
<a href="{{ path('tvdt_prepare_elimination', {seasonCode: season.seasonCode, quiz: quiz.id}) }}"
|
|
class="btn btn-secondary">{{ 'Prepare Custom Elimination'|trans }}</a>
|
|
{%~ if not quiz.eliminations.empty %}
|
|
<button class="btn btn-secondary dropdown-toggle"
|
|
data-bs-toggle="dropdown">{{ 'Load Prepared Elimination'|trans }}</button>
|
|
<ul class="dropdown-menu">
|
|
{%~ for elimination in quiz.eliminations %}
|
|
<li><a class="dropdown-item"
|
|
href="{{ path('tvdt_prepare_elimination_view', {elimination: elimination.id}) }}">{{ elimination.created|format_datetime() }}</a>
|
|
</li>
|
|
{%~ endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<p class="mb-3">{{ 'Number of dropouts:'|trans }} {{ quiz.dropouts }} </p>
|
|
<table class="table table-hover mb-3">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">{{ 'Candidate'|trans }}</th>
|
|
<th style="width: 15%" scope="col">{{ 'Correct Answers'|trans }}</th>
|
|
<th style="width: 20%" scope="col">{{ 'Corrections'|trans }}</th>
|
|
<th style="width: 20%" scope="col">{{ 'Penalty'|trans }}</th>
|
|
<th style="width: 10%" scope="col">{{ 'Score'|trans }}</th>
|
|
<th style="width: 20%" scope="col">{{ 'Time'|trans }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{%~ for candidate in result ~%}
|
|
<tr class="table-{% if loop.revindex > quiz.dropouts %}success{% else %}danger{% endif %}">
|
|
<td>{{ candidate.name }}</td>
|
|
<td>{{ candidate.correct|default('0') }}</td>
|
|
<td>
|
|
<form method="post"
|
|
action="{{ path('tvdt_backoffice_modify_correction', {quiz: quiz.id, candidate: candidate.id}) }}">
|
|
<div class="row">
|
|
<div class="col-8">
|
|
<input class="form-control form-control-sm" type="number"
|
|
value="{{ candidate.corrections }}" step="0.5"
|
|
name="corrections">
|
|
</div>
|
|
<div class="col-2">
|
|
<button class="btn btn-sm btn-primary" type="submit">{{ 'Save'|trans }}</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<form method="post"
|
|
action="{{ path('tvdt_backoffice_modify_penalty', {quiz: quiz.id, candidate: candidate.id}) }}">
|
|
<input type="hidden" name="_token" value="{{ csrf_token('candidate_answer') }}">
|
|
<div class="row">
|
|
<div class="col-8">
|
|
<input class="form-control form-control-sm" type="number"
|
|
value="{{ candidate.penaltySeconds }}" step="1"
|
|
name="penalty">
|
|
</div>
|
|
<div class="col-2">
|
|
<button class="btn btn-sm btn-primary" type="submit">{{ 'Save'|trans }}</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</td>
|
|
<td>{{ candidate.score|default('x') }}</td>
|
|
<td>{{ candidate.time.format('%i:%S') }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="5">{{ 'No results'|trans }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|