.
This commit is contained in:
@@ -37,8 +37,9 @@
|
||||
{% endif %}
|
||||
|
||||
{% if not next_unmarked_id and not unmarked %}
|
||||
<div class="alert alert-info sticky-alert" role="alert">Success! Marking question complete. <br />Return to <a
|
||||
href="{% url 'longs:mark_question_overview' exam.id question_details.current|add:'-1' %}">question
|
||||
<div class="alert alert-info sticky-alert" role="alert">Success! Marking question complete. <br />
|
||||
<a href="{% url 'longs:mark_answer' exam_id=exam.pk question_number=question_details.current|add:'-1' cid=cid %}">Set final score</a><br/>
|
||||
Return to <a href="{% url 'longs:mark_question_overview' exam.id question_details.current|add:'-1' %}">question
|
||||
overview</a>, <a href="{% url 'longs:mark_overview' pk=exam.pk %}">marking
|
||||
overview</a><br />
|
||||
{% if previous_cid %}
|
||||
|
||||
@@ -67,6 +67,7 @@ urlpatterns = [
|
||||
name="question_review",
|
||||
),
|
||||
path("exam/<int:exam_id>/<int:question_number>/<int:cid>/mark", views.mark_answer, name="mark_answer"),
|
||||
path("exam/<int:exam_id>/<int:question_number>/<int:cid>/mark_override", views.mark_answer_override, name="mark_answer_override"),
|
||||
path("exam/<int:exam_id>/<int:sk>/mark", views.mark_question_overview, name="mark_question_overview"),
|
||||
path("exam/<int:pk>/mark", views.LongExamViews.mark_overview, name="mark_overview"),
|
||||
# path("exam/<int:pk>/<int:sk>/", views.exam_take, name="exam_take"),
|
||||
|
||||
+9
-2
@@ -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,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user