From 4b03c8a565f07b43aa3f4b0dc17a24255b0551a6 Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 4 Jan 2022 13:48:31 +0000 Subject: [PATCH] . --- anatomy/templates/anatomy/exam_overview.html | 28 +------------------ .../generic/exam_overview_headers.html | 27 ++++++++++++++++++ generic/views.py | 1 + 3 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 generic/templates/generic/exam_overview_headers.html diff --git a/anatomy/templates/anatomy/exam_overview.html b/anatomy/templates/anatomy/exam_overview.html index 640ad253..3e20a0da 100644 --- a/anatomy/templates/anatomy/exam_overview.html +++ b/anatomy/templates/anatomy/exam_overview.html @@ -4,33 +4,7 @@ {% load thumbnail %}
- {% if can_edit %} - Edit - Delete - Clone - {% endif %} - {% if request.user.is_superuser %} - Admin Edit - {% endif %} -

Exam: {{ exam.name }}

- - {% include 'exam_notes.html' %} - - This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds. - - Exam mode: {{ exam.exam_mode }}
- Open access: {{ exam.open_access }}
- -
- Exam active: [When checked the exam will be available to take in the test system] -
- {% if exam.exam_mode %} -
- Publish results: [When checked the exam results will be available to users on this site] -
-

- {% endif %} + {% include 'generic/exam_overview_headers.html' %}
    {% for question in questions %} diff --git a/generic/templates/generic/exam_overview_headers.html b/generic/templates/generic/exam_overview_headers.html new file mode 100644 index 00000000..bef6e9d5 --- /dev/null +++ b/generic/templates/generic/exam_overview_headers.html @@ -0,0 +1,27 @@ +{% if can_edit %} + Edit + Delete + Clone +{% endif %} +{% comment %} {% if request.user.is_superuser %} + Admin Edit +{% endif %} {% endcomment %} +

    Exam: {{ exam.name }}

    + +{% include 'exam_notes.html' %} + +This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds. + +Exam mode: {{ exam.exam_mode }}
    +Open access: {{ exam.open_access }}
    + +
    + Exam active: [When checked the exam will be available to take in the test system] +
    +{% if exam.exam_mode %} +
    + Publish results: [When checked the exam results will be available to users on this site] +
    +

    +{% endif %} diff --git a/generic/views.py b/generic/views.py index 8a4790d9..12658a0c 100644 --- a/generic/views.py +++ b/generic/views.py @@ -500,6 +500,7 @@ class ExamViews(View, LoginRequiredMixin): "question_number": question_number, "can_edit": can_edit, "notes": notes, + "app_name": self.app_name, }, )