From 4f60fccb062bedb191a17684d53a43c1b71f4319 Mon Sep 17 00:00:00 2001
From: Ross
Date: Tue, 16 Feb 2021 17:09:02 +0000
Subject: [PATCH] .
---
anatomy/static/css/anatomy.css | 11 +
longs/forms.py | 9 +-
longs/migrations/0023_auto_20210216_1315.py | 18 ++
longs/models.py | 4 +
longs/templates/longs/long_display_block.html | 2 +
longs/templates/longs/mark.html | 90 +++------
longs/templates/longs/mark_answer.html | 45 +++++
...{long_detail.html => question_detail.html} | 0
longs/urls.py | 1 +
longs/views.py | 188 +++++++-----------
10 files changed, 188 insertions(+), 180 deletions(-)
create mode 100644 longs/migrations/0023_auto_20210216_1315.py
create mode 100644 longs/templates/longs/mark_answer.html
rename longs/templates/longs/{long_detail.html => question_detail.html} (100%)
diff --git a/anatomy/static/css/anatomy.css b/anatomy/static/css/anatomy.css
index ab2f6c02..a5c96ae7 100644
--- a/anatomy/static/css/anatomy.css
+++ b/anatomy/static/css/anatomy.css
@@ -458,4 +458,15 @@ td.user-answer-score-2::after {
.temp-thumb {
float:right;
+ }
+
+ .long-answer pre {
+ white-space: pre-wrap;
+ font: inherit;
+ color: inherit;
+ }
+
+ .long-answer .answer-heading {
+ font-style: italic;
+ font-weight: bold;
}
\ No newline at end of file
diff --git a/longs/forms.py b/longs/forms.py
index bcb5ff52..2eeff4b2 100755
--- a/longs/forms.py
+++ b/longs/forms.py
@@ -34,11 +34,10 @@ class LongAnswerForm(ModelForm):
fields = ("answer_observations","answer_interpretation","answer_principle_diagnosis","answer_differential_diagnosis","answer_management",)
-class MarkLongQuestionForm(Form):
- # correct = forms.CharField(required=False)
- # half_correct = forms.CharField(required=False)
- # incorrect = forms.CharField(required=False)
- marked_answers = CharField(required=False)
+class MarkLongQuestionForm(ModelForm):
+ class Meta:
+ model = CidUserAnswer
+ fields = ["score"]
class ExaminationForm(ModelForm):
diff --git a/longs/migrations/0023_auto_20210216_1315.py b/longs/migrations/0023_auto_20210216_1315.py
new file mode 100644
index 00000000..f2f241f2
--- /dev/null
+++ b/longs/migrations/0023_auto_20210216_1315.py
@@ -0,0 +1,18 @@
+# Generated by Django 3.1.3 on 2021-02-16 13:15
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('longs', '0022_long_mark_scheme'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='ciduseranswer',
+ name='score',
+ field=models.CharField(blank=True, choices=[('', 'Unmarked'), ('4', '4'), ('4.5', '4.5'), ('5', '5'), ('5.5', '5.5'), ('6', '6'), ('6.5', '6.5'), ('7', '7'), ('7.5', '7.5'), ('8', '8')], default='', max_length=3),
+ ),
+ ]
diff --git a/longs/models.py b/longs/models.py
index ec9d35af..c8cc5870 100644
--- a/longs/models.py
+++ b/longs/models.py
@@ -151,6 +151,7 @@ class Long(models.Model):
answers = self.cid_user_answers.all()
return [ans for ans in answers if not ans.is_marked()]
+
# def GetNonFeedbackQuestionImages(self):
# return self.GetImages()
@@ -422,6 +423,9 @@ class CidUserAnswer(models.Model):
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
+ class Meta:
+ ordering = ['cid']
+
def __str__(self):
try:
exam = self.exam
diff --git a/longs/templates/longs/long_display_block.html b/longs/templates/longs/long_display_block.html
index 0030720a..12f16caa 100755
--- a/longs/templates/longs/long_display_block.html
+++ b/longs/templates/longs/long_display_block.html
@@ -32,6 +32,8 @@
Principle Diagnosis: {{ question.model_principle_diagnosis }}
Differential Diagnosis: {{ question.model_differential_diagnosis }}
Managment: {{ question.model_management }}
+
+ Mark Scheme: {{ question.mark_scheme }}
Exam(s): {{question.GetExams}}
diff --git a/longs/templates/longs/mark.html b/longs/templates/longs/mark.html
index 1c9c73c0..06a7e0b4 100644
--- a/longs/templates/longs/mark.html
+++ b/longs/templates/longs/mark.html
@@ -1,67 +1,43 @@
{% extends 'longs/exams.html' %}
{% block content %}
-Marking question {{question_details.current}} of {{question_details.total}}
+View
Edit Admin
Edit
-{% if question.normal %}
-This question is normal
-Answers will be automatically marked.
-{% else %}
-This question is abnormal
-Answers marked as normal will be automatically marked.
-{% endif %}
-
-
-