From 0a98fcf0512a5ca50bcdba342996b0223965a3df Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 16 Oct 2021 21:28:32 +0100 Subject: [PATCH] . --- rapids/forms.py | 2 +- rapids/migrations/0034_auto_20211016_2128.py | 20 ++++++++++++++++ rapids/models.py | 24 +------------------- rapids/templates/rapids/mark.html | 2 +- 4 files changed, 23 insertions(+), 25 deletions(-) create mode 100644 rapids/migrations/0034_auto_20211016_2128.py diff --git a/rapids/forms.py b/rapids/forms.py index 2a720cb1..8d2ac962 100755 --- a/rapids/forms.py +++ b/rapids/forms.py @@ -214,4 +214,4 @@ AnswerUpdateFormSet = inlineformset_factory( class ExamForm(ModelForm): class Meta: model = Exam - fields = ["name", "time_limit", "exam_mode", "active", "archive", "double_mark", "exam_questions"] \ No newline at end of file + fields = ["name", "time_limit", "exam_mode", "active", "archive", "exam_questions"] \ No newline at end of file diff --git a/rapids/migrations/0034_auto_20211016_2128.py b/rapids/migrations/0034_auto_20211016_2128.py new file mode 100644 index 00000000..20c217d9 --- /dev/null +++ b/rapids/migrations/0034_auto_20211016_2128.py @@ -0,0 +1,20 @@ +# Generated by Django 3.2.8 on 2021-10-16 20:28 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('rapids', '0033_answermarks'), + ] + + operations = [ + migrations.RemoveField( + model_name='exam', + name='double_mark', + ), + migrations.DeleteModel( + name='AnswerMarks', + ), + ] diff --git a/rapids/models.py b/rapids/models.py index ebf8a44c..ee2c906b 100644 --- a/rapids/models.py +++ b/rapids/models.py @@ -477,9 +477,6 @@ class Exam(ExamBase): help_text='Author of exam', related_name="rapid_exam_author") - double_mark = models.BooleanField(default=False, help_text="If the exam requires double marking") - - def get_normal_abnormal_breakdown(self): # Inefficient but more extendible questions = self.exam_questions.all() @@ -665,23 +662,4 @@ class CidUserAnswer(models.Model): mark = 0 else: mark = "unmarked" - return mark - -# Not used -@reversion.register -class AnswerMarks(models.Model): - score = models.CharField( - max_length=1, choices=Answer.MarkOptions.choices - ) - - #mark_reason = models.TextField(null=True, blank=True, help_text="Reason for the given mark - not visible to candidates") - - #candidate_feedback = models.TextField(null=True, blank=True, help_text="Feedback for the candidate") - - marker = models.ForeignKey( - settings.AUTH_USER_MODEL, related_name="rapid_marks", on_delete=models.CASCADE - ) - - user_answer = models.ForeignKey( - CidUserAnswer, related_name="mark", on_delete=models.SET_NULL, null=True, blank=True - ) \ No newline at end of file + return mark \ No newline at end of file diff --git a/rapids/templates/rapids/mark.html b/rapids/templates/rapids/mark.html index 8aa431a1..d5262f72 100644 --- a/rapids/templates/rapids/mark.html +++ b/rapids/templates/rapids/mark.html @@ -126,7 +126,7 @@ $(el).after(` saved [${el.dataset.mark}]`) } }) - $("button.check-review").after("Discreptant answers are show above. Click next / save to update you your answers").hide() + $("button.check-review").after("Discreptant answers are show above. Clickinc next / save will overwrite saved scores with your current scoring.").hide() $(".save-buttons").show(); })