From eec04e3197ddd5222446a9ccbba97ca7ee122d21 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 3 Nov 2025 12:27:20 +0000 Subject: [PATCH] Refactor user scores and index templates for improved layout and help information presentation --- templates/index.html | 8 +- templates/user_scores.html | 177 +++++++++++++++++++++++-------------- 2 files changed, 115 insertions(+), 70 deletions(-) diff --git a/templates/index.html b/templates/index.html index 789be244..18ed08e7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -35,7 +35,7 @@

Grade: {{ request.user.userprofile.grade }}

Supervisor: {{ request.user.userprofile.supervisor }}

@@ -60,9 +60,9 @@ {% endif %} diff --git a/templates/user_scores.html b/templates/user_scores.html index 58b4e570..858ae208 100644 --- a/templates/user_scores.html +++ b/templates/user_scores.html @@ -1,78 +1,123 @@ {% extends 'base.html' %} +{% load help_tags %} {% block content %} -
-

User: {{ cid_user.username }}

- - {% if all_exams %} -

Exam Results

-
- The following exam results been found. Click to view answers (and scores when the results are published): - {% for exam_type, exams in all_exams %} - {% if exams %} -

{{exam_type|title}}

-
    - {% for exam in exams %} -
  • - - {% if admin %} - - {% else %} - - {% endif %} - - {{exam}} {% if exam.active %}[Active]{% endif %} {% if exam.publish_results %}[Results Published]{% endif %}
  • + {% if all_exams %} +
    +
    +
    Exam Results
    +
    +
    +

    Click an exam to view answers (and scores when results are published).

    + {% for exam_type, exams in all_exams %} + {% if exams %} +
    {{ exam_type|title }}
    +
      + {% for exam in exams %} +
    • +
      + {% if admin %} + {{ exam }} + {% else %} + {{ exam }} + {% endif %} + {% if exam.active %}Active{% endif %} + {% if exam.publish_results %}Results Published{% endif %} +
      +
       
      +
    • + {% endfor %} +
    + {% endif %} {% endfor %} -
- {% endif %} - {% endfor %} +
+
+ {% endif %} + + {% if case_collections %} +
+
+
Case Collections
+
+
+

The following Case Collections have been found.

+
    + {% for collection in case_collections %} +
  • + {{ collection.name }} +
    + {% if collection.active %}Active{% endif %} + {% if collection.publish_results %}Results Published{% endif %} +
    +
  • + {% endfor %} +
+
+
+ {% endif %} - {% endif %} - {% if case_collections %} -
-

Case Collection

- The following Case Collections have been found. - {% for collection in case_collections %} -
  • {{collection.name}} {% if collection.active %}[Active]{% endif %} {% if collection.publish_results %}[Results Published]{% endif %}
  • - - {% endfor %} +
    +
    +
    +
    Actions
    +

    Quick links and information.

    + +
    +
    - {% endif %} - +
    {% endblock %}