Add feedback display for questions based on user answers
This commit is contained in:
@@ -23,11 +23,24 @@
|
|||||||
<span class="question-text">{{q|safe}}:</span> {% if exam.publish_results %}<span class="correct-answer">Correct answer: {{correct_answer|safe}}</span>{% endif %}
|
<span class="question-text">{{q|safe}}:</span> {% if exam.publish_results %}<span class="correct-answer">Correct answer: {{correct_answer|safe}}</span>{% endif %}
|
||||||
<br />
|
<br />
|
||||||
<span class="submitted-user-answer">{{a}}</span>
|
<span class="submitted-user-answer">{{a}}</span>
|
||||||
{% if exam.publish_results or view_all_results%}
|
{% if exam.publish_results or view_all_results%}
|
||||||
<span class="answer-{{score}}">
|
<span class="answer-{{score}}">
|
||||||
(Score: {{score}})
|
(Score: {{score}})
|
||||||
</span>
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
{% if exam.publish_results %}
|
||||||
|
{% if forloop.counter0 == 0 and question.a_feedback %}
|
||||||
|
<div class="small text-muted mt-1">Feedback: {{ question.a_feedback|safe }}</div>
|
||||||
|
{% elif forloop.counter0 == 1 and question.b_feedback %}
|
||||||
|
<div class="small text-muted mt-1">Feedback: {{ question.b_feedback|safe }}</div>
|
||||||
|
{% elif forloop.counter0 == 2 and question.c_feedback %}
|
||||||
|
<div class="small text-muted mt-1">Feedback: {{ question.c_feedback|safe }}</div>
|
||||||
|
{% elif forloop.counter0 == 3 and question.d_feedback %}
|
||||||
|
<div class="small text-muted mt-1">Feedback: {{ question.d_feedback|safe }}</div>
|
||||||
|
{% elif forloop.counter0 == 4 and question.e_feedback %}
|
||||||
|
<div class="small text-muted mt-1">Feedback: {{ question.e_feedback|safe }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ol>
|
</ol>
|
||||||
|
|||||||
Reference in New Issue
Block a user