Files
penracourses/rapids/templates/rapids/exam_overview.html
T
Ross 8966eca5d1 .
2021-10-17 18:08:50 +01:00

92 lines
4.9 KiB
HTML

{% extends 'rapids/exams.html' %}
{% block content %}
{% load thumbnail %}
<div class="rapids">
{% if can_edit %}
<a href="{% url 'rapids:exam_update' exam.id %}" title="Edit the Exam">Edit</a>
<a href="{% url 'rapids:exam_delete' exam.id %}" title="Delete the Exam">Delete</a>
<a href="{% url 'rapids:exam_clone' exam.id %}" title="Clone the Exam">Clone</a>
{% endif %}
{% if request.user.is_superuser %}
<a href="{% url 'admin:rapids_exam_change' exam.id %}" title="Edit the Exam using the admin interface">Admin
Edit</a>
{% endif %}
<h1>Exam: {{ exam.name }}</h1>
{% include 'exam_notes.html' %}
This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds.<br />
<div class="parent-help" title="">
Normal count: {{ exam.get_normal_abnormal_breakdown }}<span class="help-text">[Number of normal questions within
the exam]</span>
</div>
<div class="parent-help" title="">
Exam mode: {{ exam.exam_mode }}<span class="help-text">[When true the packet will be taken as an exam (it will
not self mark and results will be saved here)]</span>
</div>
Open access: {{ exam.open_access }}<br />
<div class="parent-help" title="Click to enable / disable the exam">
Exam active: <input type="checkbox" id="exam-active-switch" {% if exam.active %}checked{% endif %} data-posturl="{% url 'rapids:exam_toggle_active' pk=exam.pk %}"> <span
class="help-text">[When checked the exam will be available to take in the test system]</span>
</div>
{% if exam.exam_mode %}
<div class="parent-help" title="Click to enable / disable the exam results">
Publish results: <input type="checkbox" id="exam-publish-results-switch" data-posturl="{% url 'rapids:exam_toggle_results_published' pk=exam.pk %}"
{% if exam.publish_results %}checked{% endif %}> <span class="help-text">[When checked the exam results will
be available on this site]</span>
</div>
{% endif %}
<p><a href="{% url 'rapids:mark_overview' pk=exam.pk %}"><button>Mark exam</button></a><a href="{% url 'rapids:mark_review' exam_pk=exam.pk sk=0 %}"><button>Review exam</button></a></p>
<ol id="full-question-list" class="sortable">
{% for question in questions.all %}
<li data-question_pk={{question.pk}}>
<span class="flex-col">
<a href="{% url 'rapids:exam_question_detail' pk=exam.pk sk=forloop.counter0 %}">
{% for image in question.get_images %}
<img src="{{ image|thumbnail_url:'exam-list' }}" alt="thumbail" />
{% endfor %}
</a>
</span>
<span class="flex-col-4">
{% if not question.normal %}
<b>Abnormality:</b> {{ question.get_abnormalities }} <b>Region:</b> {{ question.get_regions }}
<br />
{{ question.get_primary_answer }}
{% else %}
<b>Normal</b>
{% endif %}
<br />
Examination: {{ question.get_examinations }}, <a
href="{% url 'rapids:mark' exam_pk=exam.pk sk=forloop.counter0 %}">Mark</a>
<span class="id"><a href="{% url 'rapids:question_detail' pk=question.pk %}">[id: {{question.pk}}]</a></span>
</span>
</li>
{% endfor %}
</ol>
<div>
Author: {% for author in exam.author.all %}
{{ author }},
{% endfor %}
</div>
{% if can_edit %}
<p><button id='button-edit-order' title='click and drag questions to change order' data-posturl="{% url 'rapids:exam_json_edit' pk=exam.pk %}">Edit question order / Delete questions</button></p>
{% endif %}
<div>
JSON creation time: {{exam.json_creation_time}} ({{exam.json_creation_time|date:"c"}}),
JSON creation id: {{exam.exam_json_id}}
</div>
<a href="{% url 'rapids:exam_json' pk=exam.pk %}">JSON</a>
<a href="{% url 'rapids:exam_json_unbased' pk=exam.pk %}">JSON (unbased)</a>
<a href="{% url 'rapids:exam_json_recreate' pk=exam.pk %}">Refresh JSON cache</a>
<button id='button-open-access' data-posturl="{% url 'rapids:exam_json_edit' pk=exam.pk %}">Make questions open access</button>
<button id='button-closed-access' data-posturl="{% url 'rapids:exam_json_edit' pk=exam.pk %}">Make questions closed access</button>
</div>
{% include 'exam_overview_js.html' %}
{% endblock %}