.
This commit is contained in:
+1
-1
@@ -214,4 +214,4 @@ AnswerUpdateFormSet = inlineformset_factory(
|
|||||||
class ExamForm(ModelForm):
|
class ExamForm(ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Exam
|
model = Exam
|
||||||
fields = ["name", "time_limit", "exam_mode", "active", "archive", "double_mark", "exam_questions"]
|
fields = ["name", "time_limit", "exam_mode", "active", "archive", "exam_questions"]
|
||||||
@@ -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',
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -477,9 +477,6 @@ class Exam(ExamBase):
|
|||||||
help_text='Author of exam',
|
help_text='Author of exam',
|
||||||
related_name="rapid_exam_author")
|
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):
|
def get_normal_abnormal_breakdown(self):
|
||||||
# Inefficient but more extendible
|
# Inefficient but more extendible
|
||||||
questions = self.exam_questions.all()
|
questions = self.exam_questions.all()
|
||||||
@@ -666,22 +663,3 @@ class CidUserAnswer(models.Model):
|
|||||||
else:
|
else:
|
||||||
mark = "unmarked"
|
mark = "unmarked"
|
||||||
return mark
|
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
|
|
||||||
)
|
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
$(el).after(`<span class="current-mark"> saved [${el.dataset.mark}]</span>`)
|
$(el).after(`<span class="current-mark"> saved [${el.dataset.mark}]</span>`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
$("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();
|
$(".save-buttons").show();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user