From 8966eca5d1ffa1b5c0e9b7ce8dbe3d5dd2b634e6 Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 17 Oct 2021 18:08:50 +0100 Subject: [PATCH] . --- anatomy/forms.py | 2 +- anatomy/templates/anatomy/exam_overview.html | 3 +- longs/forms.py | 2 +- longs/templates/longs/exam_overview.html | 3 +- physics/forms.py | 2 +- physics/templates/physics/exam_overview.html | 159 ++++++++++--------- rapids/forms.py | 2 +- rapids/templates/rapids/exam_overview.html | 1 + sbas/templates/sbas/exam_overview.html | 111 ++++++------- 9 files changed, 145 insertions(+), 140 deletions(-) diff --git a/anatomy/forms.py b/anatomy/forms.py index 1c47f28d..b33ebba3 100644 --- a/anatomy/forms.py +++ b/anatomy/forms.py @@ -203,4 +203,4 @@ class BodyPartForm(ModelForm): class ExamForm(ModelForm): class Meta: model = Exam - fields = ["name", "time_limit", "exam_mode", "active", "archive"] \ No newline at end of file + fields = ["name", "time_limit", "open_access", "exam_mode", "active", "archive"] \ No newline at end of file diff --git a/anatomy/templates/anatomy/exam_overview.html b/anatomy/templates/anatomy/exam_overview.html index 4c9f57c6..a2fef196 100644 --- a/anatomy/templates/anatomy/exam_overview.html +++ b/anatomy/templates/anatomy/exam_overview.html @@ -18,7 +18,8 @@ This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds. - Exam mode: {{ exam.exam_mode }} + Exam mode: {{ exam.exam_mode }}
+ Open access: {{ exam.open_access }}
{% if exam.exam_mode %}
diff --git a/longs/forms.py b/longs/forms.py index 1bc61e34..3ebe3e3b 100755 --- a/longs/forms.py +++ b/longs/forms.py @@ -208,4 +208,4 @@ LongSeriesImageFormSet = inlineformset_factory( class ExamForm(ModelForm): class Meta: model = Exam - fields = ["name", "time_limit", "exam_mode", "active", "double_mark", "archive"] \ No newline at end of file + fields = ["name", "time_limit", "open_access", "exam_mode", "active", "double_mark", "archive"] \ No newline at end of file diff --git a/longs/templates/longs/exam_overview.html b/longs/templates/longs/exam_overview.html index b4fda213..811e883f 100644 --- a/longs/templates/longs/exam_overview.html +++ b/longs/templates/longs/exam_overview.html @@ -17,7 +17,8 @@ {% include 'exam_notes.html' %} This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds.
- Exam mode: {{ exam.exam_mode }} + Exam mode: {{ exam.exam_mode }}
+ Open access: {{ exam.open_access }}
{% if exam.exam_mode %}
diff --git a/physics/forms.py b/physics/forms.py index 57893414..a5db8f9f 100755 --- a/physics/forms.py +++ b/physics/forms.py @@ -31,4 +31,4 @@ class CidUserAnswerForm(ModelForm): class ExamForm(ModelForm): class Meta: model = Exam - fields = ["name", "time_limit", "exam_mode", "active"] \ No newline at end of file + fields = ["name", "time_limit", "open_access", "exam_mode", "active"] \ No newline at end of file diff --git a/physics/templates/physics/exam_overview.html b/physics/templates/physics/exam_overview.html index 08d5c2bb..7da4acc2 100644 --- a/physics/templates/physics/exam_overview.html +++ b/physics/templates/physics/exam_overview.html @@ -2,105 +2,106 @@ {% block content %} -{% load thumbnail %} -
-

Exam: {{ exam.name }}

+ {% load thumbnail %} +
+

Exam: {{ exam.name }}

- {% include 'exam_notes.html' %} + {% include 'exam_notes.html' %} - This exam has {{question_number}} questions. +

This exam has {{question_number}} questions.

+ Open access: {{ exam.open_access }}
+ +
+ Exam active: [When checked the exam will be available to take in the test system] +
+
+ Publish results: [When checked the exam results will be available on this site] +
+ + This exam will be available to take here (when active). + + {% autoescape off %} +
    + {% for question in questions.all %} + +
  1. + {{ question.stem }} +
      +
    1. + {{ question.a }}: {{ question.a_answer }} +
    2. +
    3. + {{ question.b }}: {{ question.b_answer }} +
    4. +
    5. + {{ question.c }}: {{ question.c_answer }} +
    6. +
    7. + {{ question.d }}: {{ question.d_answer }} +
    8. +
    9. + {{ question.e }}: {{ question.e_answer }} +
    10. +
    + Category: {{ question.category }}, View Edit + +
  2. + {% endfor %} +
+ {% endautoescape %} -
- Exam active: [When checked the exam will be available to take in the test system]
-
- Publish results: [When checked the exam results will be available on this site] -
- - This exam will be available to take here (when active). - - {% autoescape off %} -
    - {% for question in questions.all %} - -
  1. - {{ question.stem }} -
      -
    1. - {{ question.a }}: {{ question.a_answer }} -
    2. -
    3. - {{ question.b }}: {{ question.b_answer }} -
    4. -
    5. - {{ question.c }}: {{ question.c_answer }} -
    6. -
    7. - {{ question.d }}: {{ question.d_answer }} -
    8. -
    9. - {{ question.e }}: {{ question.e_answer }} -
    10. -
    - Category: {{ question.category }}, View Edit - -
  2. - {% endfor %} -
- {% endautoescape %} - -
- -{% endblock %} \ No newline at end of file + }) + }); + +{% endblock %} diff --git a/rapids/forms.py b/rapids/forms.py index 5c516529..b89af921 100755 --- a/rapids/forms.py +++ b/rapids/forms.py @@ -214,4 +214,4 @@ AnswerUpdateFormSet = inlineformset_factory( class ExamForm(ModelForm): class Meta: model = Exam - fields = ["name", "time_limit", "exam_mode", "active", "archive"] \ No newline at end of file + fields = ["name", "time_limit", "open_access", "exam_mode", "active", "archive"] \ No newline at end of file diff --git a/rapids/templates/rapids/exam_overview.html b/rapids/templates/rapids/exam_overview.html index bb1c6be9..3ec52d8f 100644 --- a/rapids/templates/rapids/exam_overview.html +++ b/rapids/templates/rapids/exam_overview.html @@ -26,6 +26,7 @@ Exam mode: {{ exam.exam_mode }}[When true the packet will be taken as an exam (it will not self mark and results will be saved here)]
+ Open access: {{ exam.open_access }}
Exam active: -

Exam: {{ exam.name }}

+ {% load thumbnail %} +
+

Exam: {{ exam.name }}

- {% include 'exam_notes.html' %} + {% include 'exam_notes.html' %} - This exam has {{question_number}} questions. +

This exam has {{question_number}} questions.

-
- Exam active: [When checked the exam will be available to take in the test system] -
-
- Publish results: [When checked the exam results will - be available on this site] -
- - This exam will be available to take here (when active). + Open access: {{ exam.open_access }}
+
+ Exam active: [When checked the exam will be available to take in the test system] +
+
+ Publish results: [When checked the exam results will + be available on this site] +
+ + This exam will be available to take here (when active). - {% autoescape off %} -
    - {% for question in questions.all %} + {% autoescape off %} +
      + {% for question in questions.all %} -
    1. - - {{ question.stem|safe }} -
        -
      1. {{ question.a_answer|safe }}
      2. -
      3. {{ question.b_answer|safe }}
      4. -
      5. {{ question.c_answer|safe }}
      6. -
      7. {{ question.d_answer|safe }}
      8. -
      9. {{ question.e_answer|safe }}
      10. Best answer : {{question.best_answer}} ({{question.get_correct_answer_stripped}}) +
      11. + + {{ question.stem|safe }} +
          +
        1. {{ question.a_answer|safe }}
        2. +
        3. {{ question.b_answer|safe }}
        4. +
        5. {{ question.c_answer|safe }}
        6. +
        7. {{ question.d_answer|safe }}
        8. +
        9. {{ question.e_answer|safe }}
        10. Best answer : {{question.best_answer}} ({{question.get_correct_answer_stripped}}) +
        +
        + Category: {{ question.category }}, View Edit + +
      12. + {% endfor %}
      -
      - Category: {{ question.category }}, View Edit + {% endautoescape %} -
    2. - {% endfor %} -
    - {% endautoescape %} - -
- -{% endblock %} \ No newline at end of file + }) + }); + +{% endblock %}