This commit is contained in:
Ross
2021-09-12 10:40:55 +01:00
parent 488c33f0c7
commit 1b8e4033a1
3 changed files with 13 additions and 4 deletions
+9 -2
View File
@@ -634,7 +634,13 @@ def loadJsonAnswer(answer):
@user_is_long_marker
@reversion.create_revision()
def mark_answer(request, exam_id, question_number, cid):
def mark_answer_override(request, exam_id, question_number, cid):
return mark_answer(request, exam_id, question_number, cid, override=False)
@user_is_long_marker
@reversion.create_revision()
def mark_answer(request, exam_id, question_number, cid, override=False):
exam = get_object_or_404(Exam, pk=exam_id)
questions = exam.exam_questions.all()
@@ -753,7 +759,7 @@ def mark_answer(request, exam_id, question_number, cid):
form = MarkLongQuestionDoubleForm()
discrepancy_form = False
if answer.mark.count() == 2:
if answer.mark.count() == 2 or override:
# if they do automatically update teh scoer
marks = set(answer.mark.values_list("score", flat=True))
if len(marks) > 1:
@@ -773,6 +779,7 @@ def mark_answer(request, exam_id, question_number, cid):
"unmarked": unmarked,
"previous_cid": previous_cid,
"next_cid": next_cid,
"cid": cid,
},
)