ścieżki kopernika - test form
[edumed.git] / edumed / templates / contact / sciezki-kopernika-test / results.html
diff --git a/edumed/templates/contact/sciezki-kopernika-test/results.html b/edumed/templates/contact/sciezki-kopernika-test/results.html
new file mode 100644 (file)
index 0000000..bb421eb
--- /dev/null
@@ -0,0 +1,28 @@
+{% extends base_template|default:"base.html" %}
+{% load i18n %}
+
+{% block title %}Wyniki{% endblock %}
+
+{% block body %}
+    <h1>Wyniki</h1>
+
+    <p>Suma uzyskanych punktów: {{ results.points|floatformat }} na {{ results.total }} możliwych.</p>
+
+    <p class="box-button" style="max-width: 20em;"><a href="{% url 'contact_form' 'sciezki-kopernika' %}" class="nice-button">Zgłoś się na warsztaty</a></p>
+
+    {% for question in results.questions %}
+        <strong>{{ question.label }}</strong>
+        <ol type="a">
+            {% for answer, chosen, correct in question.answers %}
+                <li style="{% if chosen %}font-weight: bold;{% endif %}{% if correct %}color: #00cc44;{% endif %}">{{ answer }}</li>
+            {% endfor %}
+        </ol>
+        {% if question.chosen == question.correct %}
+            <p>Wybrana poprawna odpowiedź {{ question.chosen }}.</p>
+        {% else %}
+            <p>Wybrana odpowiedź {{ question.chosen }}, poprawna odpowiedź {{ question.correct }}.</p>
+        {% endif %}
+        <p>Komentarz do odpowiedzi: {{ question.comment }}</p>
+    {% endfor %}
+    <p class="box-button" style="max-width: 20em;"><a href="{% url 'contact_form' 'sciezki-kopernika' %}" class="nice-button">Zgłoś się na warsztaty</a></p>
+{% endblock %}
\ No newline at end of file