From 2c66e5c7577a22d1c0cc5989eac3a48e1a8e2625 Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 17 Feb 2021 22:18:56 +0000 Subject: [PATCH] . --- longs/migrations/0025_auto_20210217_2218.py | 20 ++++++++++++++++ longs/models.py | 2 +- longs/tables.py | 2 +- longs/templates/longs/exam_overview.html | 24 ++++++++++++-------- longs/templates/longs/question_detail.html | 2 +- rapids/templates/rapids/question_detail.html | 2 +- 6 files changed, 39 insertions(+), 13 deletions(-) create mode 100644 longs/migrations/0025_auto_20210217_2218.py diff --git a/longs/migrations/0025_auto_20210217_2218.py b/longs/migrations/0025_auto_20210217_2218.py new file mode 100644 index 00000000..f0f441a3 --- /dev/null +++ b/longs/migrations/0025_auto_20210217_2218.py @@ -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'), + ), + ] diff --git a/longs/models.py b/longs/models.py index c44bee49..12d38470 100644 --- a/longs/models.py +++ b/longs/models.py @@ -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, diff --git a/longs/tables.py b/longs/tables.py index a5bccc46..f2b0b59a 100755 --- a/longs/tables.py +++ b/longs/tables.py @@ -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): diff --git a/longs/templates/longs/exam_overview.html b/longs/templates/longs/exam_overview.html index c097018a..f4a819bc 100644 --- a/longs/templates/longs/exam_overview.html +++ b/longs/templates/longs/exam_overview.html @@ -9,10 +9,11 @@ This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds.
- Exam active: [When checked the exam will be available to take in the test system] + 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] + Publish results: [When checked the exam results will be available on this site]

@@ -24,12 +25,17 @@
{% for series in question.series.all %}
- Series {{forloop.counter }}:
- {{series.get_block}} + Series {{forloop.counter0 }}:
+ {{series.get_block}}
{% endfor %}
- Author(s): {{question.get_authors}} + Author(s): {{question.get_authors}} +
+
+ View Edit
{% endfor %} @@ -58,7 +64,7 @@ console.log(data); if (data.status == "success") { - toastr.info('Exam state changed.') + toastr.info('Exam state changed.') } // show some message according to the response. // For eg. A message box showing that the status has been changed @@ -82,7 +88,7 @@ console.log(data); if (data.status == "success") { - toastr.info('Publish results state changed.') + toastr.info('Publish results state changed.') } // show some message according to the response. // For eg. A message box showing that the status has been changed @@ -106,7 +112,7 @@ console.log(data); if (data.status == "success") { - toastr.info('Question access state changed.') + toastr.info('Question access state changed.') } }) .always(function () { @@ -128,7 +134,7 @@ console.log(data); if (data.status == "success") { - toastr.info('Question access state changed.') + toastr.info('Question access state changed.') } }) .always(function () { diff --git a/longs/templates/longs/question_detail.html b/longs/templates/longs/question_detail.html index 731f7d9e..6922e497 100755 --- a/longs/templates/longs/question_detail.html +++ b/longs/templates/longs/question_detail.html @@ -9,7 +9,7 @@ {% if previous > -1 %} Previous question {% endif %} - This question is part of exam: {{exam.name}} [{{pos}}/{{exam_length}}] + This question is part of exam: {{exam.name}} [{{pos}}/{{exam_length}}] {% if next %} Next question {% endif %} diff --git a/rapids/templates/rapids/question_detail.html b/rapids/templates/rapids/question_detail.html index e3433fdf..6a5d3e4e 100755 --- a/rapids/templates/rapids/question_detail.html +++ b/rapids/templates/rapids/question_detail.html @@ -9,7 +9,7 @@ {% if previous > -1 %} Previous question {% endif %} - This question is part of exam: {{exam.name}} [{{pos}}/{{exam_length}}] + This question is part of exam: {{exam.name}} [{{pos}}/{{exam_length}}] {% if next %} Next question {% endif %}