.
This commit is contained in:
+4
-5
@@ -1504,9 +1504,10 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
for cid_user_answer in cid_user_answers:
|
||||
# Convoluted (probably...)
|
||||
if cid_user_answer.user is None:
|
||||
cid = cid_user_answer.cid
|
||||
cid = f"c/{cid_user_answer.cid}"
|
||||
cids_user_id_map[cid] = cid
|
||||
# cid_passcodes[cid] = cid_user_answer.passcode
|
||||
cids.add("c/"+cid)
|
||||
cids.add(cid)
|
||||
else:
|
||||
cid = f"u/{cid_user_answer.user.pk}"
|
||||
cids_user_id_map[cid] = cid_user_answer.user.username
|
||||
@@ -1535,11 +1536,8 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
|
||||
if self.app_name == "rapids":
|
||||
callstate = s.get_answer_callstate()
|
||||
print(cid, callstate)
|
||||
by_question[q][cid] = (ans, answer_score, callstate)
|
||||
user_answers_callstates[cid].append(callstate)
|
||||
print(user_answers_callstates)
|
||||
print("CID:::",cid, user_answers_callstates[cid])
|
||||
elif self.app_name in ("rapids", "anatomy", "sbas"):
|
||||
by_question[q][cid] = (ans, answer_score)
|
||||
else:
|
||||
@@ -1645,6 +1643,7 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
# "user_scores_list": user_scores_list,
|
||||
# "user_names": user_names,
|
||||
# "user_answers_and_marks": user_answers_and_marks,
|
||||
"cids_user_id_map": cids_user_id_map,
|
||||
"max_score": max_score,
|
||||
"mean": mean,
|
||||
"median": median,
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
{% for cid in cids %}
|
||||
<tr>
|
||||
{% if cid|slice:":1" == "u" %}
|
||||
<td>{{cid}}</td>
|
||||
<td>{{cids_user_id_map|get_item:cid}}</td>
|
||||
{% else %}
|
||||
<td><a href="{% url 'cid_scores_admin' cid %}">{{cid}}</a></td>
|
||||
<td><a href="{% url 'cid_scores_admin' cid|slice:'2:' %}">{{cid}}</a></td>
|
||||
{% endif %}
|
||||
<td>{{user_scores|get_item:cid}}</td>
|
||||
<td>{{user_scores_normalised|get_item:cid}}</td>
|
||||
@@ -52,7 +52,7 @@
|
||||
<th>Candidate</th>
|
||||
{% for cid in cids %}
|
||||
{% comment %} <th><a href="{% url 'rapids:exam_scores_cid_user' exam.pk cid %}">{{cid}}</a></th> {% endcomment %}
|
||||
<th><a href="">{{cid}}</a></th>
|
||||
<th><a href="">{{cids_user_id_map|get_item:cid}}</a></th>
|
||||
{% endfor %}
|
||||
|
||||
</tr>
|
||||
@@ -85,7 +85,7 @@
|
||||
<ul>
|
||||
{% for user, breakdown in user_answers_callstates.items %}
|
||||
<li>
|
||||
{{user}} - {{breakdown}}
|
||||
{{cids_user_id_map|get_item:user}} - {{breakdown}}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user