.
This commit is contained in:
@@ -47,8 +47,8 @@
|
|||||||
{% for question in questions %}
|
{% for question in questions %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Question {{forloop.counter}}</td>
|
<td>Question {{forloop.counter}}</td>
|
||||||
{% for ans in by_question|get_item:question %}
|
{% for ans, score in by_question|get_item:question %}
|
||||||
<td>{{ans}}</td>
|
<td class="user-answer {{score}}">{{ans}} {{score}}</td>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
+2
-2
@@ -674,7 +674,7 @@ def exam_scores_cid(request, pk):
|
|||||||
# skip if no answer
|
# skip if no answer
|
||||||
user_answers_marks[cid].append(0)
|
user_answers_marks[cid].append(0)
|
||||||
user_answers[cid].append("")
|
user_answers[cid].append("")
|
||||||
by_question[q].append("")
|
by_question[q].append(("", 0))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
ans = s.answer
|
ans = s.answer
|
||||||
@@ -686,7 +686,7 @@ def exam_scores_cid(request, pk):
|
|||||||
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))
|
||||||
|
|
||||||
by_question[q].append(ans)
|
by_question[q].append((ans, answer_score))
|
||||||
|
|
||||||
user_scores = {}
|
user_scores = {}
|
||||||
for user in user_answers_marks:
|
for user in user_answers_marks:
|
||||||
|
|||||||
Reference in New Issue
Block a user