allow completion of sbas / physics exams

This commit is contained in:
Ross
2024-12-30 11:12:36 +00:00
parent 13713d870f
commit 7493d55bc2
17 changed files with 362 additions and 240 deletions
+16 -11
View File
@@ -2,19 +2,19 @@
{% block content %}
<h1>Examinations</h1>
{% if collection %}
<h2>Collection: {{collection.name}}</h2>
<h2>Collection: {{collection.name}}</h2>
{% endif %}
<details class="help-text">
<summary><i class="bi bi-info-circle"></i> Help</summary>
{% if collection %}
<p>This page shows the examinations within the collection "{{collection.name}}".</p>
<p>This page shows all the examinations within the collection "{{collection.name}}".</p>
{% else %}
<p>This page shows the currently active examinations (that you have access to manage).</p>
{% endif %}
<p>Exams that are active will be available for candidates to take.</p>
@@ -43,8 +43,8 @@
<input type="checkbox" id="published-{{exam.pk}}" class="exam-publish-results-switch" data-posturl="{% url app_name|add:':exam_toggle_results_published' pk=exam.pk %}" {% if exam.publish_results %}checked{% endif %}>
<label for="published-{{exam.pk}}" class="flex-col icon-container published-icon" title="Click to toggle published state">Results Published</label>
<a href="{% url app_name|add:':exam_update' pk=exam.pk %}" class="flex-shrink exam-list-edit-button"><i class="bi bi-pencil-square"></i></a>
<input type="checkbox" id="archived-{{exam.pk}}" class="exam-archived-switch" data-posturl="{% url app_name|add:':exam_toggle_archived' pk=exam.pk %}" {% if exam.archive %}checked{% endif %}>
<label for="archived-{{exam.pk}}" class="flex-shrink icon-archive archived-icon" title="Click to toggle archived state"><i class="bi bi-archive"></i></label>
<input type="checkbox" id="archived-{{exam.pk}}" class="exam-archived-switch" data-posturl="{% url app_name|add:':exam_toggle_archived' pk=exam.pk %}" {% if exam.archive %}checked{% endif %}>
<label for="archived-{{exam.pk}}" class="flex-shrink icon-archive archived-icon" title="Click to toggle archived state"><i class="bi bi-archive"></i></label>
</li>
{% endif %}
{% endfor %}
@@ -56,12 +56,12 @@
{% if not exam.active %}
<li class="exam-item">
<span class="flex-col-2">
<a href="{% url app_name|add:':exam_overview' pk=exam.pk %}" class="exam-name">{{exam}}</a>
<a href="{% url app_name|add:':exam_overview' pk=exam.pk %}" class="exam-name">{{exam}}</a>
{% if exam.examcollection %}
<a href='{% url "generic:examcollection_detail" exam.examcollection_id %}' title="This exam is part of the collection {{exam.examcollection.name}}"><i class="bi bi-collection"></i></a>
{% endif %}
</span>
{% if marking %}<a href="{% url app_name|add:':mark_overview' pk=exam.pk %}" class="flex-col-half" title="Click to mark exam">Mark</a>{% endif %}
<span class="flex-col">
<a href="{% url app_name|add:':exam_cids' exam_id=exam.pk %}" title="Click to manage candidates">Candidates</a>
@@ -87,10 +87,15 @@
</ul>
{% if view_all %}
<a href="{% url app_name|add:':exam_list' %}" >Hide archived</a>
{% if collection %}
{% else %}
<a href="{% url app_name|add:':exam_list_all' %}" title="Show all exams (including archived)">View all</a>
{% if view_all %}
<a href="{% url app_name|add:':exam_list' %}" >Hide archived</a>
{% else %}
<a href="{% url app_name|add:':exam_list_all' %}" title="Show all exams (including archived)">View all</a>
{% endif %}
{% endif %}
</div>
{% include 'exam_overview_js.html' %}
+32 -34
View File
@@ -1,39 +1,37 @@
{% extends 'base.html' %}
{% load auth_extras %}
{% block content %}
<p>
<div class="anatomy">
<h1>PENRA Courses</h1>
{% if not request.user.is_authenticated %}
<a href="{% url 'login'%}">Log in</a><br/>
<a href="{% url 'password_reset'%}">Reset password</a>
{% else %}
<h1>PENRA Courses</h1>
{% if not request.user.is_authenticated %}
<a href="{% url 'login'%}">Log in</a><br/>
<a href="{% url 'password_reset'%}">Reset password</a>
{% else %}
{% comment %} <a href="{% url 'atlas:index'%}">Atlas</a>
<a href="{% url 'anatomy:index'%}">Anatomy</a>
<a href="{% url 'physics:index'%}">Physics</a>
<a href="{% url 'rapids:index'%}">Rapids</a>
<a href="{% url 'longs:index'%}">Longs</a>
<a href="{% url 'sbas:index'%}">SBAs</a> {% endcomment %}
{% endif %}
</div>
</p>
{% endif %}
{% if request.user.is_authenticated %}
{% if request.user.userprofile.peninsula_trainee %}
<div id="user-details">
Please check your details are correct.<br/>
Name: {{request.user.first_name}} {{request.user.last_name}}<br/>
Email: {{request.user.email}}<br/>
Grade: {{request.user.userprofile.grade}}<br/>
Supervisor: {{request.user.userprofile.supervisor}}
<div id="user-details card">
<div class="card-body">
<h5 class="card-title">Please check your details are correct.</h5>
Name: {{request.user.first_name}} {{request.user.last_name}}<br/>
Email: {{request.user.email}}<br/>
Grade: {{request.user.userprofile.grade}}<br/>
Supervisor: {{request.user.userprofile.supervisor}}
</div>
</div>
{% endif %}
{% if request.user.supervisor %}
<a href='{% url "generic:supervisor_overview" request.user.supervisor.pk %}'>Supervisor overview</a>
<a href='{% url "generic:supervisor_overview" request.user.supervisor.pk %}'>Supervisor overview</a>
{% endif %}
<p>
@@ -42,26 +40,26 @@
</p>
{% endif %}
{% if collections %}
<h2>Exam collections</h2>
<ul>
{% for collection in collections %}
<li><a href="{% url 'generic:examcollection_detail' collection.pk %}">{{collection.name}}</a></li>
{% endfor %}
</ul>
<h2>Exam collections</h2>
<ul>
{% for collection in collections %}
<li><a href="{% url 'generic:examcollection_detail' collection.pk %}">{{collection.name}}</a></li>
{% endfor %}
</ul>
{% endif %}
<p><a href="http://www.penracourses.org.uk/rts">RTS is available here</a></p>
{% if rcr_assessor %}
<div>
{% if rcr_assessor %}
<div>
<h3><a href="{% url 'rcr:radiology_index_view'%}">RCR platform migration</a></h3>
</div>
{% endif %}
</div>
{% endif %}
{% if not request.user.is_authenticated %}
<p><a href="{% url 'cid_selector' %}">CID users can log in here</a></p>
@@ -83,10 +81,10 @@
</div>
{% if request.user.is_superuser %}
<a href="{% url 'django_psutil_dash:dashboard' %}">psutil</a>
<a href="{% url 'django_psutil_dash:dashboard' %}">psutil</a>
{% endif %}
{% endblock %}