intranet/templates/Emails/safetyQuizResults.html.twig
2023-09-19 16:24:19 +00:00

34 lines
940 B
Twig

{% apply inline_css %}
<style>
.correct
{
background-color: #9dff96;
}
.incorrect
{
background-color: #ff9696;
}
</style>
<h1>A Quiz-taker has submitted the J.V. Safety Quiz <h1>
<h2> {{ submitterName }} has completed the quiz, scoring {{answersCorrect}}/{{totalQuestions}} correct.</h2>
<table>
<th>
<td>#</td>
<td>Question</td>
<td>Submitted Answer</td>
<td>Correct Answer</td>
</th>
{% for key,question in submission %}
<tr>
<td>{{key}}</td>
<td>{{question["Text"]}}</td>
{% if question['submittedAnswer'] != null %}
<td class="{{ (question['submittedAnswer']==true)? 'correct': 'incorrect' }}">
{{question['submittedAnswer']}}
</td>
{% endif %}
<td>{{question['answer']['Value']}}</td>
</tr>
{% endfor %}
</table>
{% endapply %}