Refactor user scores and index templates for improved layout and help information presentation
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
<p class="mb-1"><strong>Grade:</strong> {{ request.user.userprofile.grade }}</p>
|
<p class="mb-1"><strong>Grade:</strong> {{ request.user.userprofile.grade }}</p>
|
||||||
<p class="mb-0"><strong>Supervisor:</strong> {{ request.user.userprofile.supervisor }}</p>
|
<p class="mb-0"><strong>Supervisor:</strong> {{ request.user.userprofile.supervisor }}</p>
|
||||||
<div role="alert" class="alert alert-warning mt-3">
|
<div role="alert" class="alert alert-warning mt-3">
|
||||||
If any of this information is incorrect, please update it via your <a href="{% url 'profile' %}">profile page</a>
|
If any of this information is incorrect, please update it via your <a href="{% url 'profile' %}">profile page</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -60,9 +60,9 @@
|
|||||||
<div class="alert alert-info" role="alert">
|
<div class="alert alert-info" role="alert">
|
||||||
<h5 class="alert-heading mb-1">Not a Peninsula trainee?</h5>
|
<h5 class="alert-heading mb-1">Not a Peninsula trainee?</h5>
|
||||||
<p class="mb-0">If you are an external user, please <a href="{% url 'cid_selector' %}">log in via CID</a>.</p>
|
<p class="mb-0">If you are an external user, please <a href="{% url 'cid_selector' %}">log in via CID</a>.</p>
|
||||||
{% help "Help" %}
|
{% help "Help" %}
|
||||||
You should have received your candidate ID and login details by email or directly from your course organiser. If you have not, please contact them for assistance.
|
You should have received your candidate ID and login details by email or directly from your course organiser. If you have not, please contact them for assistance.
|
||||||
{% endhelp %}
|
{% endhelp %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
+111
-66
@@ -1,78 +1,123 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
{% load help_tags %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="">
|
<div class="container py-4">
|
||||||
<h2>User: {{ cid_user.username }}</h2>
|
<div class="row mb-3">
|
||||||
<div class="alert alert-dark" role="alert">
|
<div class="col-md-8">
|
||||||
<details>
|
<h2 class="mb-1">User: {{ cid_user.username }}</h2>
|
||||||
<summary>Help</summary>
|
{% help "Help" %}
|
||||||
<p>This page shows the exam(s) to which you have access.</p>
|
<div class="card mt-2">
|
||||||
<p>When an exam is available to take it will have a "Start" button next to it.</p>
|
<div class="card-body small">
|
||||||
<p>Once you have submitted answers you will be able to view them from the Exam results section. (Please note: although your answers will be visible as soon as they are submitted, correct answers will only be available when the exam results have been published.)</p>
|
<p class="mb-1">This page shows the exam(s) to which you have access.</p>
|
||||||
<p>If you have not submitted any answer for an exam it will not appear in the Exam Results section below. In this case you can still review the pubilshed results by following the "Results Published" link in the assigend exams section.</p>
|
<p class="mb-1">When an exam is available to take it will have a "Start" button next to it.</p>
|
||||||
</details>
|
<p class="mb-1">Once you have submitted answers you will be able to view them from the Exam results section. (Please note: although your answers will be visible as soon as they are submitted, correct answers will only be available when the exam results have been published.)</p>
|
||||||
|
<p class="mb-0">If you have not submitted any answer for an exam it will not appear in the Exam Results section below. In this case you can still review the published results by following the "Results Published" link in the assigned exams section.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endhelp %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h3>Assigned Exams</h3>
|
|
||||||
<div id="exam-assigned">
|
<div class="row">
|
||||||
The following exams will be available to take when active.
|
<div class="col-lg-8">
|
||||||
{% for exam_type, exams in available_exams %}
|
<div class="card mb-3">
|
||||||
{% if exams %}
|
<div class="card-header">
|
||||||
<h4>{{exam_type|title}}</h4>
|
<h5 class="mb-0">Assigned Exams</h5>
|
||||||
<ul class='{{exam_type|lower}}'>
|
</div>
|
||||||
{% for exam in exams %}
|
<div class="card-body">
|
||||||
<li class="exam" data-exam-id="{{exam.pk}}">{{exam}}
|
<p class="text-muted">The following exams will be available to take when active.</p>
|
||||||
{% if exam.active %}
|
{% for exam_type, exams in available_exams %}
|
||||||
<a href="{{exam.get_take_url}}" target="_blank" title="Click to take exam">
|
{% if exams %}
|
||||||
<button class="small-url-button start-button">Start</button>
|
<h6 class="mt-3">{{ exam_type|title }}</h6>
|
||||||
</a>
|
<ul class="list-group">
|
||||||
{% endif %}
|
{% for exam in exams %}
|
||||||
{% if exam.publish_results %}
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
<a href= "{% url exam_type|lower|add:':exam_scores_user' pk=exam.pk %}" title="Click to view results">
|
<div>
|
||||||
<button class="small-url-button results-button">Results Published</button>
|
{{ exam }}
|
||||||
</a>
|
{% if exam.active %}<span class="badge bg-success ms-2">Active</span>{% endif %}
|
||||||
{% endif %}
|
{% if exam.publish_results %}<span class="badge bg-info text-dark ms-2">Results Published</span>{% endif %}
|
||||||
</li>
|
</div>
|
||||||
|
<div class="btn-group btn-group-sm" role="group">
|
||||||
|
{% if exam.active %}
|
||||||
|
<a class="btn btn-primary" href="{{ exam.get_take_url }}" target="_blank" title="Click to take exam">Start</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if exam.publish_results %}
|
||||||
|
<a class="btn btn-outline-secondary" href="{% url exam_type|lower|add:':exam_scores_user' pk=exam.pk %}" title="Click to view results">Results</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if all_exams %}
|
{% if all_exams %}
|
||||||
<h3>Exam Results</h3>
|
<div class="card mb-3">
|
||||||
<div id="exam-results">
|
<div class="card-header">
|
||||||
The following exam results been found. Click to view answers (and scores when the results are published):
|
<h5 class="mb-0">Exam Results</h5>
|
||||||
{% for exam_type, exams in all_exams %}
|
</div>
|
||||||
{% if exams %}
|
<div class="card-body">
|
||||||
<h4>{{exam_type|title}}</h4>
|
<p class="text-muted">Click an exam to view answers (and scores when results are published).</p>
|
||||||
<ul class='{{exam_type|lower}}'>
|
{% for exam_type, exams in all_exams %}
|
||||||
{% for exam in exams %}
|
{% if exams %}
|
||||||
<li class="exam" data-exam-id="{{exam.pk}}">
|
<h6 class="mt-3">{{ exam_type|title }}</h6>
|
||||||
|
<ul class="list-group">
|
||||||
{% if admin %}
|
{% for exam in exams %}
|
||||||
<a href= "{% url exam_type|add:':exam_scores_user_admin' pk=exam.pk user_id=user.pk %}" title="Click to view results">
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
{% else %}
|
<div>
|
||||||
<a href= "{% url exam_type|add:':exam_scores_user' pk=exam.pk %}" title="Click to view results">
|
{% if admin %}
|
||||||
{% endif %}
|
<a href="{% url exam_type|add:':exam_scores_user_admin' pk=exam.pk user_id=user.pk %}">{{ exam }}</a>
|
||||||
|
{% else %}
|
||||||
{{exam}}</a> {% if exam.active %}[Active]{% endif %} {% if exam.publish_results %}[Results Published]{% endif %}</li>
|
<a href="{% url exam_type|add:':exam_scores_user' pk=exam.pk %}">{{ exam }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if exam.active %}<span class="badge bg-success ms-2">Active</span>{% endif %}
|
||||||
|
{% if exam.publish_results %}<span class="badge bg-info text-dark ms-2">Results Published</span>{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="small text-muted"> </div>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if case_collections %}
|
||||||
|
<div class="card mb-3">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">Case Collections</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<p class="text-muted">The following Case Collections have been found.</p>
|
||||||
|
<ul class="list-group">
|
||||||
|
{% for collection in case_collections %}
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
|
<a href="{{ collection.get_take_url }}?cid={{ cid }}&passcode={{ passcode }}">{{ collection.name }}</a>
|
||||||
|
<div>
|
||||||
|
{% if collection.active %}<span class="badge bg-success">Active</span>{% endif %}
|
||||||
|
{% if collection.publish_results %}<span class="badge bg-info text-dark ms-2">Results Published</span>{% endif %}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if case_collections %}
|
<div class="col-lg-4">
|
||||||
<div>
|
<div class="card mb-3">
|
||||||
<h3>Case Collection</h3>
|
<div class="card-body">
|
||||||
The following Case Collections have been found.
|
<h6 class="card-title">Actions</h6>
|
||||||
{% for collection in case_collections %}
|
<p class="small text-muted">Quick links and information.</p>
|
||||||
<li><a href="{{collection.get_take_url}}?cid={{cid}}&passcode={{passcode}}">{{collection.name}}</a> {% if collection.active %}[Active]{% endif %} {% if collection.publish_results %}[Results Published]{% endif %}</li>
|
<!-- Placeholder for any future quick actions -->
|
||||||
|
</div>
|
||||||
{% endfor %}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user