.
This commit is contained in:
@@ -406,6 +406,20 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
|
||||
questions = exam.exam_questions.all()
|
||||
|
||||
|
||||
# Long cases require some special info
|
||||
try:
|
||||
if exam.double_mark:
|
||||
question_unmarked_map = []
|
||||
for q in questions:
|
||||
question_unmarked_map.append((q, int(q.get_unmarked_answer_count(exam_pk=exam.pk)), int(q.get_unmarked_answer_count(exam_pk=exam.pk, marker=request.user)) ))
|
||||
|
||||
return render(
|
||||
request, "{}/mark_overview.html".format(self.app_name), {"exam": exam, "question_unmarked_map": question_unmarked_map})
|
||||
)
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
question_unmarked_map = []
|
||||
for q in questions:
|
||||
question_unmarked_map.append((q, int(q.get_unmarked_answer_count(exam_pk=exam.pk))))
|
||||
|
||||
@@ -12,10 +12,19 @@
|
||||
marking</button></a></div>
|
||||
|
||||
<ul id="question-mark-list">
|
||||
{% for question, unmarked_count in question_unmarked_map %}
|
||||
{% for question, unmarked_count, unmarked_count_marker in question_unmarked_map %}
|
||||
<li data-markcount={{unmarked_count}} {% if unmarked_count %}class="unmarked" {% endif %}><a
|
||||
href="{% url 'longs:mark_question_overview' exam_id=exam.pk sk=forloop.counter0 %}">Question {{forloop.counter }}:
|
||||
{{ question }}</a><br /> Answers to mark: {{unmarked_count}}</li>
|
||||
{{ question }}</a><br /> Answers incompletely marked: {{unmarked_count}}
|
||||
{% if exam.double_mark %}
|
||||
<br/>
|
||||
Answers left for you to mark: {{unmarked_count_marker}}
|
||||
|
||||
{% endif %}
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user