From 8dbd02f361c8bbd903808b7f5202092fdb8eaada Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 9 Apr 2022 11:01:16 +0100 Subject: [PATCH 1/6] . --- atlas/templates/atlas/collection_scores.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atlas/templates/atlas/collection_scores.html b/atlas/templates/atlas/collection_scores.html index 6fefdb1f..95c97126 100644 --- a/atlas/templates/atlas/collection_scores.html +++ b/atlas/templates/atlas/collection_scores.html @@ -62,8 +62,8 @@ {{ans_by_question|get_item:question|get_item:cid}} {% endfor %} {% endcomment %} {% for cid in cids %} - {% with by_question|get_item:question|get_item:cid as ans_score %} - {{ans_score.0}} + {% with by_question|get_item:question.case|get_item:cid as ans_score %} + {{ans_score.1}} {% endwith %} {% endfor %} From 0724601fcdf93f01a775d7f4739f4b733a7297f3 Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 9 Apr 2022 11:02:58 +0100 Subject: [PATCH 2/6] . --- atlas/templates/atlas/collection_scores.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atlas/templates/atlas/collection_scores.html b/atlas/templates/atlas/collection_scores.html index 95c97126..e8b84856 100644 --- a/atlas/templates/atlas/collection_scores.html +++ b/atlas/templates/atlas/collection_scores.html @@ -62,7 +62,7 @@ {{ans_by_question|get_item:question|get_item:cid}} {% endfor %} {% endcomment %} {% for cid in cids %} - {% with by_question|get_item:question.case|get_item:cid as ans_score %} + {% with by_question|get_item:question|get_item:cid as ans_score %} {{ans_score.1}} {% endwith %} {% endfor %} From 4c6663ca7e8c1c6ee108d6f0e2aca1e1258673e6 Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 9 Apr 2022 11:03:39 +0100 Subject: [PATCH 3/6] . --- atlas/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atlas/views.py b/atlas/views.py index 59a55411..62016b0f 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -1440,7 +1440,7 @@ def collection_scores_cid(request, pk): s = cid_user_answer user_names[cid] = cid - q = cid_user_answer.question + q = cid_user_answer.question.case # if not s: # # skip if no answer From 04a4a71ab656a360e19866491dbc903740ab723f Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 9 Apr 2022 11:05:02 +0100 Subject: [PATCH 4/6] . --- atlas/templates/atlas/collection_scores.html | 2 +- atlas/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/atlas/templates/atlas/collection_scores.html b/atlas/templates/atlas/collection_scores.html index e8b84856..89a8d757 100644 --- a/atlas/templates/atlas/collection_scores.html +++ b/atlas/templates/atlas/collection_scores.html @@ -63,7 +63,7 @@ {% endfor %} {% endcomment %} {% for cid in cids %} {% with by_question|get_item:question|get_item:cid as ans_score %} - {{ans_score.1}} + {{ans_score.1}} {% endwith %} {% endfor %} diff --git a/atlas/views.py b/atlas/views.py index 62016b0f..887bce78 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -1459,7 +1459,7 @@ def collection_scores_cid(request, pk): user_answers_marks[cid].append(answer_score) user_answers_and_marks[cid].append((ans, answer_score)) - by_question[q][cid] = (ans, answer_score) + by_question[q][cid] = (ans, answer_score, ans.feedback) user_scores = {} user_scores_normalised = {} From 7544dd6104d8ef8539bdf5a2d598baa983582db7 Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 9 Apr 2022 11:05:32 +0100 Subject: [PATCH 5/6] . --- atlas/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atlas/views.py b/atlas/views.py index 887bce78..0ffe0425 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -1459,7 +1459,7 @@ def collection_scores_cid(request, pk): user_answers_marks[cid].append(answer_score) user_answers_and_marks[cid].append((ans, answer_score)) - by_question[q][cid] = (ans, answer_score, ans.feedback) + by_question[q][cid] = (ans, answer_score, s.feedback) user_scores = {} user_scores_normalised = {} From 69d698f97a0658c29b52f622026ae3204c1c9767 Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 10 Apr 2022 21:32:14 +0100 Subject: [PATCH 6/6] . --- atlas/templates/atlas/collection_scores.html | 2 +- atlas/views.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/atlas/templates/atlas/collection_scores.html b/atlas/templates/atlas/collection_scores.html index 89a8d757..abbec8a1 100644 --- a/atlas/templates/atlas/collection_scores.html +++ b/atlas/templates/atlas/collection_scores.html @@ -63,7 +63,7 @@ {% endfor %} {% endcomment %} {% for cid in cids %} {% with by_question|get_item:question|get_item:cid as ans_score %} - {{ans_score.1}} + {{ans_score.1}} {% endwith %} {% endfor %} diff --git a/atlas/views.py b/atlas/views.py index 0ffe0425..152c7bd0 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -1399,6 +1399,7 @@ def collection_case_view(request, pk, case_number): ) +# TODO: this needs a major cleanup @user_is_collection_author_or_atlas_editor def collection_scores_cid(request, pk): collection = get_object_or_404(CaseCollection, pk=pk)