From 0cf655325cffa1536aaa361120edcf0948c3fef9 Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 15 May 2026 20:04:13 +0100 Subject: [PATCH] feat: Enhance collection review and overview templates with improved styling and conditional content display --- .../atlas/collection_review_start.html | 156 ++++++++++++++---- .../atlas/collection_take_overview.html | 4 +- 2 files changed, 128 insertions(+), 32 deletions(-) diff --git a/atlas/templates/atlas/collection_review_start.html b/atlas/templates/atlas/collection_review_start.html index 1273b539..e8575304 100644 --- a/atlas/templates/atlas/collection_review_start.html +++ b/atlas/templates/atlas/collection_review_start.html @@ -1,47 +1,143 @@ {% extends 'atlas/base.html' %} {% block content %} -

Collection: {{exam}}

+ + +
+
+

Review: {{ collection.name }}

+ Review Collection +
+

Open the collection and browse completed cases.

+
{% if collection.start_screen_content %} -
-
- {{ collection.start_screen_content|safe }} -
-
+
+ {{ collection.start_screen_content|safe }} +
{% endif %} - {% if collection.start_screen_resources.exists %} -
-
-
Resources
- {% for resource in collection.start_screen_resources.all %} -
{{ resource.get_display }}
+ {% if start_screen_resources %} +
+
Resources
+
+ {% for resource in start_screen_resources %} +
{{ resource.get_display }}
{% endfor %}
-
+ {% endif %} -{% comment %} {% endcomment %} + {% if request.user.is_authenticated and valid_user %} +
+
+
User
+
{{ request.user }}
- User: {{request.user}}
+ {% if cid_exam %} +
Started
+
{{ cid_exam.start_time }}
- {% if cid_exam %} - Started: {{cid_exam.start_time}}
- {% if cid_exam.completed %} - Ended: {{cid_exam.end_time}}
+ {% if cid_exam.completed %} +
Ended
+
{{ cid_exam.end_time }}
+ {% endif %} + {% endif %} +
+ +
+ + Browse + + + {% if cid_exam.completed %} + Overview + {% endif %} +
+
+ + {% if collection.show_results_sharing_information and sharing_summary %} +
+
Who can see your results
+
    +
  • + You + Always visible to you. +
  • + {% for u in sharing_summary.always_visible_to %} +
  • + Author/Marker + {{ u.get_full_name|default:u.username }} + {% if u.email %}<{{ u.email }}>{% endif %} +
  • + {% endfor %} + {% if sharing_summary.supervisor_always %} +
  • + Supervisor + {% if sharing_summary.supervisor %} + {{ sharing_summary.supervisor.get_full_name|default:sharing_summary.supervisor.username }} + (always shared - collection setting) + {% else %} + Your supervisor, if one is linked to your profile (collection setting always on). + {% endif %} +
  • + {% elif sharing_summary.supervisor_opt_in %} +
  • + Supervisor + {% if sharing_summary.supervisor %} + {{ sharing_summary.supervisor.get_full_name|default:sharing_summary.supervisor.username }} + - you can choose to share with them after starting. + {% else %} + You have a supervisor linked but they do not have a login account yet. + {% endif %} +
  • + {% endif %} + {% if not sharing_summary.always_visible_to and not sharing_summary.supervisor_always and not sharing_summary.supervisor_opt_in %} +
  • Only you can see your results for this collection.
  • + {% endif %} +
+
{% endif %} + {% else %} +
+

+ Please sign in to access this review collection. + Log in here. +

+
{% endif %} - - {% if cid_exam.completed %} - - {% else %} - - {% endif %} - {% endblock %} diff --git a/atlas/templates/atlas/collection_take_overview.html b/atlas/templates/atlas/collection_take_overview.html index 9d1a82a7..9115b90f 100644 --- a/atlas/templates/atlas/collection_take_overview.html +++ b/atlas/templates/atlas/collection_take_overview.html @@ -57,7 +57,7 @@
- Case {{ forloop.counter }}{% if collection.show_title_post %}: {{ question.case.title|default:question.case.pk|truncatechars:70 }}{% endif %} + Case {{ forloop.counter }}{% if collection.show_title_post and answer and answer.completed or collection.show_title_post and cid_user_exam.completed %}: {{ question.case.title|default:question.case.pk|truncatechars:70 }}{% endif %} {% if answer and answer.completed or cid_user_exam.completed %} Completed {% elif answer %} @@ -79,7 +79,7 @@ {% endif %} {% endif %}
- {% if collection.show_title_post %} + {% if collection.show_title_post and answer and answer.completed or collection.show_title_post and cid_user_exam.completed %}
{{ question.case }}