.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<div class="alert alert-warning" role="alert">
|
||||
The following questions need marking
|
||||
{% for exam_index in unmarked %}
|
||||
<a href="{% url 'longs:mark' exam.pk exam_index %}">{{ exam_index|add:1 }}</a>
|
||||
<a href="{% url 'longs:mark_question_overview' exam.pk exam_index %}">{{ exam_index|add:1 }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</thead>
|
||||
{% for question in questions %}
|
||||
<tr>
|
||||
<td><a href="{% url 'longs:mark' pk=exam.pk sk=forloop.counter0 %}">Question {{forloop.counter}}</a></td>
|
||||
<td><a href="{% url 'longs:mark_question_overview' pk=exam.pk sk=forloop.counter0 %}">Question {{forloop.counter}}</a></td>
|
||||
{% for ans, score in by_question|get_item:question %}
|
||||
<td class="user-answer-score-{{score}}" title="answer score: {{score}}">{{score}}</td>
|
||||
{% endfor %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{% for exam in exams %}
|
||||
<div class="longs">
|
||||
<h1><a href="{% url 'longs:exam_overview' pk=exam.pk %}">Exam: {{ exam.name }} </a></h1>
|
||||
{% if request.user.is_staff %}<a href="{% url 'longs:mark' pk=exam.pk sk=0 %}">Mark answers</a>{% endif %}
|
||||
{% if request.user.is_staff %}<a href="{% url 'longs:mark_question_overview' pk=exam.pk sk=0 %}">Mark answers</a>{% endif %}
|
||||
{% if request.user.is_staff %}<a href="{% url 'longs:exam_scores_cid' pk=exam.pk %}">Scores</a>{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
</ul>
|
||||
<div>
|
||||
{% if question_details.current > 1 %}
|
||||
<a href="{% url 'longs:mark' exam.id question_details.current|add:'-2' %}"
|
||||
<a href="{% url 'longs:mark_question_overview' exam.id question_details.current|add:'-2' %}"
|
||||
title="Previous question">Previous</a>
|
||||
{% endif %}
|
||||
{% if question_details.current >= question_details.total %}
|
||||
{% else %}
|
||||
<a href="{% url 'longs:mark' exam.id question_details.current %}" title="Next question">Next</a>
|
||||
<a href="{% url 'longs:mark_question_overview' exam.id question_details.current %}" title="Next question">Next</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
title="Edit the user answer using the admin interface">Admin
|
||||
Edit (user answer)</a>
|
||||
{% endif %}
|
||||
<h2>Marking question <a href="{% url 'longs:mark' exam.id question_details.current|add:'-1' %}"
|
||||
<h2>Marking question <a href="{% url 'longs:mark_question_overview' exam.id question_details.current|add:'-1' %}"
|
||||
title="View question answers">{{question_details.current}}</a> of {{question_details.total}}</h2>
|
||||
|
||||
{% 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' exam.id question_details.current|add:'-1' %}">question
|
||||
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 %}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<ul id="question-mark-list">
|
||||
{% for question, unmarked_count in question_unmarked_map %}
|
||||
<li data-markcount={{unmarked_count}} {% if unmarked_count %}class="unmarked" {% endif %}><a
|
||||
href="{% url 'longs:mark' pk=exam.pk sk=forloop.counter0 %}">Question {{forloop.counter }}:
|
||||
href="{% url 'longs:mark_question_overview' pk=exam.pk sk=forloop.counter0 %}">Question {{forloop.counter }}:
|
||||
{{ question }}</a><br /> Answers to mark: {{unmarked_count}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
+1
-1
@@ -67,7 +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:pk>/<int:sk>/mark", views.mark, name="mark"),
|
||||
path("exam/<int:pk>/<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"),
|
||||
path(
|
||||
|
||||
+3
-3
@@ -697,7 +697,7 @@ def mark_answer(request, exam_id, question_number, cid):
|
||||
if "save" in request.POST:
|
||||
return redirect("longs:mark_answer", exam_id=exam_id, question_number=question_number, cid=cid)
|
||||
#elif "previous" in request.POST:
|
||||
# return redirect("longs:mark", pk=exam_id, sk=n - 1)
|
||||
# return redirect("longs:mark_question_overview", pk=exam_id, sk=n - 1)
|
||||
|
||||
else:
|
||||
form = MarkLongQuestionForm(initial={'score': answer.score})
|
||||
@@ -722,7 +722,7 @@ def mark_answer(request, exam_id, question_number, cid):
|
||||
# @user_passes_test(user_is_admin, login_url="/accounts/login")
|
||||
@login_required
|
||||
@user_is_long_marker
|
||||
def mark(request, pk, sk):
|
||||
def mark_question_overview(request, pk, sk):
|
||||
exam = get_object_or_404(Exam, pk=pk)
|
||||
|
||||
questions = exam.exam_questions.all()
|
||||
@@ -746,7 +746,7 @@ def mark(request, pk, sk):
|
||||
|
||||
return render(
|
||||
request,
|
||||
"longs/mark.html",
|
||||
"longs/mark_question_overview.html",
|
||||
{
|
||||
"exam": exam,
|
||||
"question": question,
|
||||
|
||||
Reference in New Issue
Block a user