This commit is contained in:
Ross
2021-10-17 18:14:05 +01:00
parent 8966eca5d1
commit 6937b0acbe
8 changed files with 107 additions and 17 deletions
@@ -0,0 +1,18 @@
# Generated by Django 3.2.8 on 2021-10-17 17:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('anatomy', '0045_exam_open_access'),
]
operations = [
migrations.AlterField(
model_name='exam',
name='open_access',
field=models.BooleanField(default=False, help_text='If the exam is freely accessible (to view and edit on the test system)'),
),
]
+4 -4
View File
@@ -21,13 +21,13 @@
Exam mode: {{ exam.exam_mode }}<br />
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 'anatomy: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">
Exam active: <input type="checkbox" id="exam-active-switch" {% if exam.active %}checked{% endif %} data-posturl="{% url 'anatomy:exam_toggle_active' pk=exam.pk %}"> <span> <span class="help-text">[When checked the exam will be available to take in the test system]</span>
</div>
<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 'anatomy: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 to users on this site]</span>
{% if exam.publish_results %}checked{% endif %}> <span class="help-text">[When checked the exam results will be available to users on this site]</span>
</div>
<p><a href="{% url 'anatomy:mark_overview' pk=exam.pk %}"><button>Mark exam</button></a></p>
{% endif %}
+1 -1
View File
@@ -78,7 +78,7 @@ class ExamBase(models.Model):
archive = models.BooleanField(help_text="Archived exams will remain on the test system but will not be displayed by default", default=False)
open_access = models.BooleanField(
help_text="If the exam is freely accessible", default=False
help_text="If the exam is freely accessible (to view and edit on the test system)", default=False
)
#time_limit = models.IntegerField(
@@ -0,0 +1,18 @@
# Generated by Django 3.2.8 on 2021-10-17 17:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('longs', '0053_exam_open_access'),
]
operations = [
migrations.AlterField(
model_name='exam',
name='open_access',
field=models.BooleanField(default=False, help_text='If the exam is freely accessible (to view and edit on the test system)'),
),
]
+12 -12
View File
@@ -5,9 +5,9 @@
{% load thumbnail %}
<div class="longs">
{% if can_edit %}
<a href="{% url 'longs:exam_update' exam.id %}" title="Edit the Exam">Edit</a>
<a href="{% url 'longs:exam_delete' exam.id %}" title="Delete the Exam">Delete</a>
<a href="{% url 'longs:exam_clone' exam.id %}" title="Clone the Exam">Clone</a>
<a href="{% url 'longs:exam_update' exam.id %}" title="Edit the Exam">Edit</a>
<a href="{% url 'longs:exam_delete' exam.id %}" title="Delete the Exam">Delete</a>
<a href="{% url 'longs:exam_clone' exam.id %}" title="Clone the Exam">Clone</a>
{% endif %}
{% if request.user.is_superuser %}
<a href="{% url 'admin:longs_exam_change' exam.id %}" title="Edit the Exam using the admin interface">Admin Edit</a>
@@ -20,17 +20,17 @@
Exam mode: {{ exam.exam_mode }}<br />
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">
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>
<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>
{% 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 'longs:mark_overview' pk=exam.pk %}"><button>Mark exam</button></a></p>
@@ -87,8 +87,8 @@
<a href="{% url 'longs:exam_json_recreate' pk=exam.pk %}">Refresh JSON cache</a>
<a href="{% url 'longs:refresh_exam_question_json' pk=exam.pk %}">Refresh Question 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>
<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>
{% endif %}
</div>
@@ -0,0 +1,18 @@
# Generated by Django 3.2.8 on 2021-10-17 17:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('physics', '0013_exam_open_access'),
]
operations = [
migrations.AlterField(
model_name='exam',
name='open_access',
field=models.BooleanField(default=False, help_text='If the exam is freely accessible (to view and edit on the test system)'),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2.8 on 2021-10-17 17:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rapids', '0035_exam_open_access'),
]
operations = [
migrations.AlterField(
model_name='exam',
name='open_access',
field=models.BooleanField(default=False, help_text='If the exam is freely accessible (to view and edit on the test system)'),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2.8 on 2021-10-17 17:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sbas', '0005_exam_open_access'),
]
operations = [
migrations.AlterField(
model_name='exam',
name='open_access',
field=models.BooleanField(default=False, help_text='If the exam is freely accessible (to view and edit on the test system)'),
),
]