34 lines
943 B
Twig
34 lines
943 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> {{ data.getData['Name']}} has completed the quiz, scoring {{answersCorrect}}/{{totalAnswers}} correct.</h2>
|
|
<table>
|
|
<th>
|
|
<td>#</td>
|
|
<td>Question</td>
|
|
<td>Submitted Answer</td>
|
|
<td>Correct Answer</td>
|
|
</th>
|
|
{% for question in submission %}
|
|
<tr>
|
|
<td>{{question}}</td>
|
|
<td>{{question.Text}}</td>
|
|
<td class="{{ (question['submittedAnswer']==question['answer'])? 'correct': 'incorrect' }}">
|
|
{% if submittedAnswer != null %}
|
|
{{question['submittedAnswer']}}
|
|
{% endif %}
|
|
</td>
|
|
<td>{{quesiton['answer']}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endapply %} |