This commit is contained in:
Ross
2022-09-04 11:27:09 +01:00
parent e4c6d9196c
commit 1ed5a07ecf
+23 -16
View File
@@ -1,21 +1,28 @@
{% extends 'sbas/base.html' %} {% extends 'sbas/base.html' %}
{% block content %} {% block content %}
<div class="sbas"> <div class="sbas">
<h2>Exam: {{ exam.name }}</h2> <h2>Exam: {{ exam.name }}</h2>
<h3>Candidate: {{ cid }}</h3> <h3>Candidate: {{ cid }}</h3>
Answers: {% if not exam.publish_results %}
<ul> <div class="alert alert-info" role="alert"><h4>Exam results not published</h4>Submitted answers are visible below.</div>
{% for question, a, score, correct_answer, chosen_answer in answers_and_marks %} {% endif %}
<li class="user-answer-li"><a href="{% url 'sbas:exam_take' exam.pk forloop.counter0 cid passcode %}">Question Answers:
{{forloop.counter}}</a> - {{ question.stem |safe}}</li> <ul>
<span>Correct answer: {{correct_answer|safe}} <br />Chosen answer: {{a}} {{chosen_answer|safe}} <span class="answer-{{score}}">(Score: {% for question, a, score, correct_answer, chosen_answer in answers_and_marks %}
{{score}})</span></span> <li class="user-answer-li"><a href="{% url 'sbas:exam_take' exam.pk forloop.counter0 cid passcode %}">Question
{% endfor %} {{forloop.counter}}</a> - {{ question.stem |safe}}</li>
</ul> <span>Correct answer: {{correct_answer|safe}} <br />Chosen answer: {{a}} {{chosen_answer|safe}}
<br /> Total mark: {{ total_score }} / {{max_score}} {% if exam.publish_results or view_all_results %}
<div> <span class="answer-{{score}}">(Score: {{score}})</span>
<a href="{% url 'cid_scores' cid passcode %}">Other exams</a> {% endif %}
</span>
{% endfor %}
</ul>
<br /> Total mark: {{ total_score }} / {{max_score}}
<div>
<a href="{% url 'cid_scores' cid passcode %}">Other exams</a>
</div>
</div> </div>
</div>
{% endblock %} {% endblock %}