.
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 3.2.10 on 2022-04-04 21:56
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('anatomy', '0058_exam_user_scores'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='exam',
|
||||||
|
name='include_history',
|
||||||
|
field=models.BooleanField(default=False, help_text='If an exam should include history when taking'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -80,6 +80,11 @@ class ExamBase(models.Model):
|
|||||||
default=False,
|
default=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
include_history = models.BooleanField(
|
||||||
|
help_text="If an exam should include history when taking",
|
||||||
|
default=False,
|
||||||
|
)
|
||||||
|
|
||||||
publish_results = models.BooleanField(
|
publish_results = models.BooleanField(
|
||||||
help_text="If an exams results should be available", default=False
|
help_text="If an exams results should be available", default=False
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 3.2.10 on 2022-04-04 21:56
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('longs', '0057_exam_user_scores'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='exam',
|
||||||
|
name='include_history',
|
||||||
|
field=models.BooleanField(default=False, help_text='If an exam should include history when taking'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 3.2.10 on 2022-04-04 21:56
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('physics', '0017_exam_user_scores'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='exam',
|
||||||
|
name='include_history',
|
||||||
|
field=models.BooleanField(default=False, help_text='If an exam should include history when taking'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 3.2.10 on 2022-04-04 21:56
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('rapids', '0045_rapidimage_description'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='exam',
|
||||||
|
name='include_history',
|
||||||
|
field=models.BooleanField(default=False, help_text='If an exam should include history when taking'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -463,6 +463,7 @@ class Rapid(models.Model):
|
|||||||
"type": "rapid",
|
"type": "rapid",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
json["history"] = self.history
|
||||||
json["normal"] = self.normal
|
json["normal"] = self.normal
|
||||||
json["feedback_images"] = feedback_images
|
json["feedback_images"] = feedback_images
|
||||||
json["answers"] = list(self.get_correct_unstripped_answers())
|
json["answers"] = list(self.get_correct_unstripped_answers())
|
||||||
@@ -632,6 +633,10 @@ class Exam(ExamBase):
|
|||||||
q.get_correct_unstripped_answers()
|
q.get_correct_unstripped_answers()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if self.include_history:
|
||||||
|
exam_questions[q.id]["history"] = q.history
|
||||||
|
|
||||||
|
|
||||||
# if feedback_images:
|
# if feedback_images:
|
||||||
# exam_questions[q.id]["feedback_image"] = feedback_images
|
# exam_questions[q.id]["feedback_image"] = feedback_images
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<div class="pre-whitespace multi-image-block"><b>Images:</b>
|
<div class="pre-whitespace multi-image-block"><b>Images:</b>
|
||||||
{% for image in question.images.all %}
|
{% for image in question.images.all %}
|
||||||
<span class="image-block">
|
<span class="image-block">
|
||||||
Image {{ forloop.counter }}{% if image.feedback_image %} [feedback image]{% endif %}:
|
Image {{ forloop.counter }}{% if image.description %} ({{image.description}}){% endif %}{% if image.feedback_image %} [feedback image]{% endif %}:
|
||||||
<div class="dicom-image rapid-img {% if image.feedback_image %}feedback-img{% endif %}"
|
<div class="dicom-image rapid-img {% if image.feedback_image %}feedback-img{% endif %}"
|
||||||
data-url="https://www.penracourses.org.uk{{ image.image.url}}"></div>
|
data-url="https://www.penracourses.org.uk{{ image.image.url}}"></div>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 3.2.10 on 2022-04-04 21:56
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('sbas', '0009_exam_user_scores'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='exam',
|
||||||
|
name='include_history',
|
||||||
|
field=models.BooleanField(default=False, help_text='If an exam should include history when taking'),
|
||||||
|
),
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user