From 46313cf5bbe5d41395cd003542a63f1eaf8e2f8a Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 22 Dec 2025 11:20:39 +0000 Subject: [PATCH] Refactor exam candidates view for improved layout and user experience --- generic/templates/generic/exam_cids.html | 286 ++++++++++++----------- 1 file changed, 144 insertions(+), 142 deletions(-) diff --git a/generic/templates/generic/exam_cids.html b/generic/templates/generic/exam_cids.html index f4b063d4..75994107 100644 --- a/generic/templates/generic/exam_cids.html +++ b/generic/templates/generic/exam_cids.html @@ -1,160 +1,162 @@ - +{% block content %} +
+
+
+

Candidates for {{ exam.get_exam_name }}

+
+ Edit Exam CIDs + Edit Exam Users +
+
+
-
-

CID candidates

- {% if cid_users %} -

{{cid_user_count}} CID candidates.

- -
- -
    - {% for cid in cid_users %} - -
  1. -
    - - - {{cid.cid}} - [{{cid.passcode}}] - - -
    -
    {{cid.name}}
    -
    Email: {{cid.email}}
    -
  2. - - {% endfor %} -
- {% else %} -

This exam has no CID candidates. Add some with the below link.

- {% endif %} - - - Edit Exam CIDs -
-
- -
-

User candidates

- {% if user_users %} -

{{user_user_count}} User candidates.

- -
    - {% for user in user_users %} - -
  1. - -
    - - {% if request.user.is_superuser %} - +
    +
    +
    +
    +
    CID candidates ({{ cid_user_count }})
    +
    + {% if cid_users %} +
      + {% for cid in cid_users %} +
    • +
      +
      +
      + + {{ cid.cid }} + [{{ cid.passcode }}] + +
      +
      {{ cid.name }}
      +
      Email: {{ cid.email }}
      +
      +
      + {% if cid.login_email_sent %} + Email sent + {% else %} + Not sent + {% endif %} +
      +
      +
    • + {% endfor %} +
    + {% else %} +

    This exam has no CID candidates. Add some with the edit link above.

    {% endif %} - {{user.username}}
    -
    Email: {{user.email}}
    -
  2. +
+
+ - {% endfor %} - - {% else %} -

This exam has no User candidates. Add some with the below link.

- {% endif %} - Edit Exam Users +
+
+
+
User candidates ({{ user_user_count }})
+ {% if user_users %} +
    + {% for user in user_users %} +
  • +
    +
    + + {% if request.user.is_superuser %} + + {% endif %} + {{ user.username }} +
    +
    Email: {{ user.email }}
    +
    +
     
    +
  • + {% endfor %} +
+ {% else %} +

This exam has no User candidates. Add some with the edit link above.

+ {% endif %} +
+
+
+ - + {% if user_exam_data %} +
+
+
+
+
Submitted candidates
+

The following candidate submissions have been received. Candidates with submissions are highlighted above.

+
    + {% for user_data in user_exam_data %} +
  • CID: {{user_data.cid_user}} / User: {{user_data.user_user}} / Start: {{user_data.start_time}} / End: {{user_data.end_time}}
  • + {% endfor %} +
+
+
+
+
+ {% endif %} -
+
+
+ +
+
-{% if user_exam_data %} -
-
- -

Submitted candidates

-
- The following candidate submissions have been received. Candidates with submissions will be shown in green above. -
    - {% for user_data in user_exam_data %} -
  • - CID: {{user_data.cid_user}} / - User: {{user_data.user_user}} / - Start time: {{user_data.start_time}} / - End time: {{user_data.end_time}} / - -
  • - {% endfor %} -
-
+ +
-
-{% endif %} - - Exam history - - +{% endblock %} {% block js %} - -{% endblock js %} +{% endblock %} {% block css %} -{% endblock css %} - - - +{% endblock %} \ No newline at end of file