{# Show parts A-E as coloured badges indicating correctness #}
A
{% if ua.a is None %}
N/A
{% elif ua.a == question.a_answer %}
{{ ua.a|yesno:"T,F" }}
{% else %}
{{ ua.a|yesno:"T,F" }}
{% endif %}
B
{% if ua.b is None %}
N/A
{% elif ua.b == question.b_answer %}
{{ ua.b|yesno:"T,F" }}
{% else %}
{{ ua.b|yesno:"T,F" }}
{% endif %}
C
{% if ua.c is None %}
N/A
{% elif ua.c == question.c_answer %}
{{ ua.c|yesno:"T,F" }}
{% else %}
{{ ua.c|yesno:"T,F" }}
{% endif %}
D
{% if ua.d is None %}
N/A
{% elif ua.d == question.d_answer %}
{{ ua.d|yesno:"T,F" }}
{% else %}
{{ ua.d|yesno:"T,F" }}
{% endif %}
E
{% if ua.e is None %}
N/A
{% elif ua.e == question.e_answer %}
{{ ua.e|yesno:"T,F" }}
{% else %}
{{ ua.e|yesno:"T,F" }}
{% endif %}
{% if ua.created_date %}
Answered: {{ ua.created_date }}
{% endif %}
{# Physics scoring may be numeric; show a simple badge if fully correct according to score field where present #}
{% if ua.score %}
{% if ua.score|stringformat:'s' == '5' %}
Correct
{% else %}
Score: {{ ua.score }}
{% endif %}
{% else %}
Unmarked
{% endif %}