.
This commit is contained in:
@@ -37,7 +37,7 @@ Region: {{ question.get_regions }}, Abnormalities: {{ question.get_abnormalities
|
||||
{% if exam_answers_only %}
|
||||
Showing exam answers only <a href="{% url 'rapids:mark_all' exam.id question_number %}">(view all)</a>
|
||||
{% else %}
|
||||
Showing all answers
|
||||
Showing all answers <a href="{% url 'rapids:mark' exam.id question_number %}">(view unmarked exam answers)</a>
|
||||
{% endif %}
|
||||
|
||||
<div class="marking-list">
|
||||
|
||||
+7
-3
@@ -580,6 +580,10 @@ def mark_all(request, exam_pk, sk):
|
||||
def mark(request, exam_pk, sk, exam_answers_only=True):
|
||||
exam = get_object_or_404(Exam, pk=exam_pk)
|
||||
|
||||
mark_url = "rapids:mark"
|
||||
if exam_answers_only:
|
||||
mark_url = "rapids:mark_all"
|
||||
|
||||
questions = exam.exam_questions.all()
|
||||
|
||||
n = sk
|
||||
@@ -623,7 +627,7 @@ def mark(request, exam_pk, sk, exam_answers_only=True):
|
||||
if form.is_valid():
|
||||
# If skip button is pressed skip the question without marking
|
||||
if "skip" in request.POST:
|
||||
return redirect("rapids:mark", exam_pk=exam_pk, sk=n + 1)
|
||||
return redirect(mark_url, exam_pk=exam_pk, sk=n + 1)
|
||||
|
||||
cd = form.cleaned_data
|
||||
# correct = cd.get("correct")
|
||||
@@ -695,9 +699,9 @@ def mark(request, exam_pk, sk, exam_answers_only=True):
|
||||
# answer.published_date = timezone.now()
|
||||
# answer.save()
|
||||
if "next" in request.POST:
|
||||
return redirect("rapids:mark", exam_pk=exam_pk, sk=n + 1)
|
||||
return redirect(mark_url, exam_pk=exam_pk, sk=n + 1)
|
||||
elif "previous" in request.POST:
|
||||
return redirect("rapids:mark", exam_pk=exam_pk, sk=n - 1)
|
||||
return redirect(mark_url, exam_pk=exam_pk, sk=n - 1)
|
||||
|
||||
# Reset user answers (relies on the functional javascript)
|
||||
unmarked_user_answers = set()
|
||||
|
||||
Reference in New Issue
Block a user