.
This commit is contained in:
@@ -3,6 +3,11 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="anatomy">
|
<div class="anatomy">
|
||||||
<h2>{{ exam.name }}</h2>
|
<h2>{{ exam.name }}</h2>
|
||||||
|
|
||||||
|
{% for question in unmarked.items %}
|
||||||
|
{{ question.pk}}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
{% for user, value in user_answers_marks.items %}
|
{% for user, value in user_answers_marks.items %}
|
||||||
<h3>Candidate: <a href="{% url 'anatomy:cid_scores' user %}">{{ user_names|get_item:user }}</a></h3>
|
<h3>Candidate: <a href="{% url 'anatomy:cid_scores' user %}">{{ user_names|get_item:user }}</a></h3>
|
||||||
<!-- Answers: {{ user_answers_and_marks|get_item:user }}-->
|
<!-- Answers: {{ user_answers_and_marks|get_item:user }}-->
|
||||||
|
|||||||
@@ -577,6 +577,8 @@ def exam_scores_cid(request, pk):
|
|||||||
user_answers = defaultdict(list)
|
user_answers = defaultdict(list)
|
||||||
user_names = {}
|
user_names = {}
|
||||||
|
|
||||||
|
unmarked = set()
|
||||||
|
|
||||||
# Loop through all candidates
|
# Loop through all candidates
|
||||||
for cid in cids:
|
for cid in cids:
|
||||||
# Convoluted (probably...)
|
# Convoluted (probably...)
|
||||||
@@ -592,6 +594,8 @@ def exam_scores_cid(request, pk):
|
|||||||
|
|
||||||
ans = s.answer
|
ans = s.answer
|
||||||
answer_score = s.get_answer_score()
|
answer_score = s.get_answer_score()
|
||||||
|
if answer_score == "unmarked":
|
||||||
|
unmarked.add(q)
|
||||||
user_answers[cid].append(ans)
|
user_answers[cid].append(ans)
|
||||||
user_answers_marks[cid].append(answer_score)
|
user_answers_marks[cid].append(answer_score)
|
||||||
user_answers_and_marks[cid].append((ans, answer_score))
|
user_answers_and_marks[cid].append((ans, answer_score))
|
||||||
@@ -626,6 +630,7 @@ def exam_scores_cid(request, pk):
|
|||||||
"anatomy/exam_scores.html",
|
"anatomy/exam_scores.html",
|
||||||
{
|
{
|
||||||
"exam": exam,
|
"exam": exam,
|
||||||
|
"unmarked": unmarked,
|
||||||
"questions": questions,
|
"questions": questions,
|
||||||
"user_answers": dict(user_answers),
|
"user_answers": dict(user_answers),
|
||||||
"user_answers_marks": dict(user_answers_marks),
|
"user_answers_marks": dict(user_answers_marks),
|
||||||
|
|||||||
Reference in New Issue
Block a user