From 75be7c173961b9e5d555b6a1c8c371317c8d3fea Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 19 Jan 2026 12:30:49 +0000 Subject: [PATCH] Refactor exam scores user template to enhance question display and viewer functionality --- .../templates/anatomy/exam_scores_user.html | 141 +++++++++--------- 1 file changed, 73 insertions(+), 68 deletions(-) diff --git a/anatomy/templates/anatomy/exam_scores_user.html b/anatomy/templates/anatomy/exam_scores_user.html index d216e6c1..26889b41 100644 --- a/anatomy/templates/anatomy/exam_scores_user.html +++ b/anatomy/templates/anatomy/exam_scores_user.html @@ -1,67 +1,78 @@ {% extends 'base.html' %} {% block content %} -
-
HIDE/SHOW
-
- Question No question loaded
-
- -
-
-
Answers:
-
-
-
{% include 'user_score_header.html' %} +
+
+
+
+
    + {% for ans, score, correct_answer in answers_and_marks %} +
  • +
    +
    + {{ forloop.counter }} +
    +
    +
    Question {{ forloop.counter }}
    +
    Correct answer: {% if exam.publish_results %}{{ correct_answer }}{% else %}—{% endif %}
    +
    {{ ans }}
    + {% if exam.publish_results or view_all_results %} +
    Marks: {{ score }}
    + {% endif %} +
    +
    +
    + {% if exam.publish_results %} + + {% else %} + + {% endif %} + {% if request.user.is_staff %} + + {% endif %} +
    +
  • + {% endfor %} +
+
+
-
-
-
    - {% for ans, score, correct_answer in answers_and_marks %} -
  • -
    -
    - {{ forloop.counter }} -
    -
    -
    Question {{ forloop.counter }}
    -
    - Correct answer: {% if exam.publish_results %}{{ correct_answer }}{% else %}—{% endif %} -
    -
    -
    {{ ans }}
    -
    - {% if exam.publish_results or view_all_results %} -
    Marks: {{ score }}
    - {% endif %} + {% include 'user_scores_footer.html' %} +
    + +
    + {% if exam.publish_results %} +
    +
    +
    Viewer
    + +
    +
    +
    +
    +
    Question No question loaded
    +
    +
    +
    +
    Answers:
    -
    - - {% if request.user.is_staff %} - - {% endif %} -
    -
  • - {% endfor %} -
+
+
+ {% endif %}
- - {% include 'user_scores_footer.html' %}
{% endblock %} {% block js %} + {% if exam.publish_results %} + {% endif %} {% endblock %}