This commit is contained in:
Ross
2021-10-17 18:08:50 +01:00
parent 346ee42763
commit 8966eca5d1
9 changed files with 145 additions and 140 deletions
+1 -1
View File
@@ -203,4 +203,4 @@ class BodyPartForm(ModelForm):
class ExamForm(ModelForm):
class Meta:
model = Exam
fields = ["name", "time_limit", "exam_mode", "active", "archive"]
fields = ["name", "time_limit", "open_access", "exam_mode", "active", "archive"]
+2 -1
View File
@@ -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 }}<br />
Open access: {{ exam.open_access }}<br />
{% if exam.exam_mode %}
<div class="parent-help" title="Click to enable / disable the exam">
+1 -1
View File
@@ -208,4 +208,4 @@ LongSeriesImageFormSet = inlineformset_factory(
class ExamForm(ModelForm):
class Meta:
model = Exam
fields = ["name", "time_limit", "exam_mode", "active", "double_mark", "archive"]
fields = ["name", "time_limit", "open_access", "exam_mode", "active", "double_mark", "archive"]
+2 -1
View File
@@ -17,7 +17,8 @@
{% include 'exam_notes.html' %}
This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds.<br />
Exam mode: {{ exam.exam_mode }}
Exam mode: {{ exam.exam_mode }}<br />
Open access: {{ exam.open_access }}<br />
{% if exam.exam_mode %}
<div class="parent-help" title="Click to enable / disable the exam">
+1 -1
View File
@@ -31,4 +31,4 @@ class CidUserAnswerForm(ModelForm):
class ExamForm(ModelForm):
class Meta:
model = Exam
fields = ["name", "time_limit", "exam_mode", "active"]
fields = ["name", "time_limit", "open_access", "exam_mode", "active"]
+7 -6
View File
@@ -2,13 +2,14 @@
{% block content %}
{% load thumbnail %}
<div class="physics">
{% load thumbnail %}
<div class="physics">
<h1>Exam: {{ exam.name }}</h1>
{% include 'exam_notes.html' %}
This exam has {{question_number}} questions.
<p>This exam has {{question_number}} questions.</p>
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 %}> <span class="help-text">[When checked the exam will be available to take in the test system]</span>
@@ -49,8 +50,8 @@
</ol>
{% endautoescape %}
</div>
<script type="text/javascript">
</div>
<script type="text/javascript">
$(document).ready(function () {
// send request to change the is_private state on customSwitches toggle
$("#exam-active-switch").on("change", function () {
@@ -102,5 +103,5 @@
})
})
});
</script>
</script>
{% endblock %}
+1 -1
View File
@@ -214,4 +214,4 @@ AnswerUpdateFormSet = inlineformset_factory(
class ExamForm(ModelForm):
class Meta:
model = Exam
fields = ["name", "time_limit", "exam_mode", "active", "archive"]
fields = ["name", "time_limit", "open_access", "exam_mode", "active", "archive"]
@@ -26,6 +26,7 @@
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
+7 -6
View File
@@ -2,14 +2,15 @@
{% block content %}
{% load thumbnail %}
<div class="sbas">
{% load thumbnail %}
<div class="sbas">
<h1>Exam: {{ exam.name }}</h1>
{% include 'exam_notes.html' %}
This exam has {{question_number}} questions.
<p>This exam has {{question_number}} questions.</p>
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 %}> <span
class="help-text">[When checked the exam will be available to take in the test system]</span>
@@ -45,8 +46,8 @@
</ol>
{% endautoescape %}
</div>
<script type="text/javascript">
</div>
<script type="text/javascript">
$(document).ready(function () {
// send request to change the is_private state on customSwitches toggle
$("#exam-active-switch").on("change", function () {
@@ -98,5 +99,5 @@
})
})
});
</script>
</script>
{% endblock %}