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