.
This commit is contained in:
@@ -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
@@ -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
@@ -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):
|
||||
|
||||
@@ -9,10 +9,11 @@
|
||||
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>
|
||||
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>
|
||||
</div>
|
||||
<p><a href="{% url 'longs:mark_overview' pk=exam.pk %}"><button>Mark exam</button></a></p>
|
||||
|
||||
@@ -24,12 +25,17 @@
|
||||
<br />
|
||||
{% for series in question.series.all %}
|
||||
<div class="series-block">
|
||||
Series {{forloop.counter }}:<br />
|
||||
{{series.get_block}}
|
||||
Series {{forloop.counter0 }}:<br />
|
||||
{{series.get_block}}
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div>
|
||||
Author(s): {{question.get_authors}}
|
||||
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 %}
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user