From 3bd543654d7bfacf0aa12416154168ba32c82910 Mon Sep 17 00:00:00 2001 From: Audrey Jensen Date: Tue, 19 Sep 2023 21:34:52 +0000 Subject: [PATCH] error handling & formatting --- templates/Emails/safetyQuizResults.html.twig | 39 +++++++++++++++----- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/templates/Emails/safetyQuizResults.html.twig b/templates/Emails/safetyQuizResults.html.twig index 2a16af1..7507a64 100644 --- a/templates/Emails/safetyQuizResults.html.twig +++ b/templates/Emails/safetyQuizResults.html.twig @@ -12,23 +12,42 @@

A Quiz-taker has submitted the J.V. Safety Quiz

{{ submitterName }} has completed the quiz, scoring {{answersCorrect}}/{{totalQuestions}} correct.

- - - - - + + + + + + + + + {% for key,question in submission %} - - - {% if question['submittedAnswer'] != null %} + + {% else %} + N/A + {% endif %} + + + {% endfor %} +
- #QuestionSubmitted AnswerCorrect Answer
#QuestionSubmitted AnswerCorrect Answer
{{key}}{{question["Text"]}} + {% if key != null %} + {{key}} + {% if question["Text"] != null %} + {{question["Text"]}} + {% else %} + N/A + {% endif %} + {{question['submittedAnswer']}} + {% if question['answer']['Label'] != null %} + {{question['answer']['Label']}} + {% else %} + N/A {% endif %} - {{question['answer']['Value']}}
{% endapply %} \ No newline at end of file