This commit is contained in:
Ross
2021-02-17 22:18:56 +00:00
parent 326c155c24
commit 2c66e5c757
6 changed files with 39 additions and 13 deletions
@@ -0,0 +1,20 @@
# Generated by Django 3.1.3 on 2021-02-17 22:18
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('generic', '0007_site'),
('longs', '0024_auto_20210217_1423'),
]
operations = [
migrations.AlterField(
model_name='longseries',
name='examination',
field=models.ForeignKey(help_text='Name of the examination, this appears as the thumbnail title on the test system', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='series_examination', to='generic.examination'),
),
]
+1 -1
View File
@@ -177,7 +177,7 @@ class LongSeries(models.Model):
)
examination = models.ForeignKey(
Examination,
help_text="Name of the examination",
help_text="Name of the examination, this appears as the thumbnail title on the test system",
related_name="series_examination",
on_delete=models.SET_NULL,
null=True,
+1 -1
View File
@@ -68,7 +68,7 @@ class LongTable(tables.Table):
class Meta:
model = Long
template_name = "django_tables2/bootstrap4.html"
fields = ("created_date", "author")
fields = ("history", "created_date", "author")
sequence = ("view", "series", "exams")
class PopupLinkColumn(tables.Column):
+8 -2
View File
@@ -9,7 +9,8 @@
This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds.
<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>
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>
</div>
<div class="parent-help" title="Click to enable / disable the exam results">
Publish results: <input type="checkbox" id="exam-publish-results-switch" {% if exam.publish_results %}checked{% endif %}> <span class="help-text">[When checked the exam results will be available on this site]</span>
@@ -24,13 +25,18 @@
<br />
{% for series in question.series.all %}
<div class="series-block">
Series {{forloop.counter }}:<br />
Series {{forloop.counter0 }}:<br />
{{series.get_block}}
</div>
{% endfor %}
<div>
Author(s): {{question.get_authors}}
</div>
<div>
<a href="{% url 'longs:exam_question_detail' exam.id forloop.counter0 %}"
title="View the question">View</a> <a href="{% url 'longs:long_update' question.id %}"
title="Edit the question">Edit</a>
</div>
</li>
{% endfor %}
</ol>
+1 -1
View File
@@ -9,7 +9,7 @@
{% if previous > -1 %}
<a href="{% url 'longs:exam_question_detail' exam.id previous %}">Previous question</a>
{% endif %}
This question is part of exam: {{exam.name}} [{{pos}}/{{exam_length}}]
This question is part of exam: <a href="{% url 'longs:exam_overview' exam.id %}">{{exam.name}}</a> [{{pos}}/{{exam_length}}]
{% if next %}
<a href="{% url 'longs:exam_question_detail' exam.id next %}">Next question</a>
{% endif %}
+1 -1
View File
@@ -9,7 +9,7 @@
{% if previous > -1 %}
<a href="{% url 'rapids:exam_question_detail' exam.id previous %}">Previous question</a>
{% endif %}
This question is part of exam: {{exam.name}} [{{pos}}/{{exam_length}}]
This question is part of exam: <a href="{% url 'rapids:exam_overview' exam.id %}">{{exam.name}}</a> [{{pos}}/{{exam_length}}]
{% if next %}
<a href="{% url 'rapids:exam_question_detail' exam.id next %}">Next question</a>
{% endif %}