Files
TijdVoorDeTest/templates/backoffice/quiz/tab_candidates_list.html.twig
T
Marijn 18a6090366 Answer on candidate (#72)
* 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
2026-03-22 22:40:25 +01:00

51 lines
2.2 KiB
Twig

<h4 class="mb-3">{{ 'Candidates'|trans }}</h4>
<table class="table table-hover mb-3">
<thead>
<tr>
<th scope="col">{{ 'Name'|trans }}</th>
<th scope="col">{{ 'Quiz Status'|trans }}</th>
<th scope="col">{{ 'Candidate Status'|trans }}</th>
<th scope="col">{{ 'Actions'|trans }}</th>
</tr>
</thead>
<tbody>
{% for data in candidateData %}
{% set candidate = data.candidate %}
{% set quizCandidate = data.quizCandidate %}
{% set givenAnswersCount = data.givenAnswersCount %}
<tr>
<td>{{ candidate.name }}</td>
<td>
{% if quizCandidate and quizCandidate.started %}
{% if givenAnswersCount >= quiz.questions|length %}
<span class="badge text-bg-success">{{ 'Completed'|trans }}</span>
{% else %}
<span class="badge text-bg-warning">{{ 'In Progress'|trans }} ({{ givenAnswersCount }}/{{ quiz.questions|length }})</span>
{% endif %}
{% else %}
<span class="badge text-bg-secondary">{{ 'Not Started'|trans }}</span>
{% endif %}
</td>
<td>
{% if quizCandidate == null or quizCandidate.active %}
<span class="badge text-bg-success">{{ 'Active'|trans }}</span>
{% else %}
<span class="badge text-bg-secondary">{{ 'Inactive'|trans }}</span>
{% endif %}
</td>
<td>
<a href="{{ path('tvdt_backoffice_toggle_candidate', {quiz: quiz.id, candidate: candidate.id}) }}"
class="btn btn-sm btn-outline-secondary">
{% if quizCandidate == null or quizCandidate.active %}
{{ 'Deactivate'|trans }}
{% else %}
{{ 'Activate'|trans }}
{% endif %}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>