.
This commit is contained in:
@@ -725,6 +725,16 @@ def mark_answer(request, exam_id, question_number, cid):
|
||||
mark_object.marker = request.user
|
||||
mark_object.save()
|
||||
|
||||
# Form is saved, check if we have two marks (and if they match)
|
||||
if answer.mark.count() == 2:
|
||||
# if they do automatically update teh scoer
|
||||
marks = set(answer.mark.values_list("score", flat=True))
|
||||
if len(marks) == 1:
|
||||
answer.score = marks[0]
|
||||
answer.save()
|
||||
|
||||
|
||||
|
||||
if "next" in request.POST:
|
||||
return redirect("longs:mark_answer", exam_id=exam_id, question_number=question_number, cid=next_unmarked_id)
|
||||
if "save" in request.POST:
|
||||
|
||||
Reference in New Issue
Block a user