From af749d9aa7bfcb3d5bd842b6adea41a6fe203ce8 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 17 Dec 2020 18:39:18 +0000 Subject: [PATCH] fix links --- anatomy/templates/anatomy/exam_scores.html | 2 +- anatomy/views.py | 54 +++++++++++----------- physics/templates/physics/exam_scores.html | 2 +- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/anatomy/templates/anatomy/exam_scores.html b/anatomy/templates/anatomy/exam_scores.html index 6acd001c..7faa4133 100644 --- a/anatomy/templates/anatomy/exam_scores.html +++ b/anatomy/templates/anatomy/exam_scores.html @@ -13,7 +13,7 @@ {% endif %} {% for user, value in user_answers_marks.items %} -

Candidate: {{ user_names|get_item:user }}

+

Candidate: {{ user_names|get_item:user }}

Answers: {% for ans, score in user_answers_and_marks|get_item:user %} {{ans}} ({{score}}), diff --git a/anatomy/views.py b/anatomy/views.py index d8531ac9..19adfae7 100644 --- a/anatomy/views.py +++ b/anatomy/views.py @@ -762,33 +762,33 @@ def exam_scores(request, pk): }, ) -def cid_scores(request, pk): - #exam = get_object_or_404(Exam, pk=pk) - - # TODO:Need some kind of test for cid - cid = pk - - #questions = exam.exam_questions.all() - answers = CidUserAnswer.objects.filter( - cid=cid) - - - if not answers: - raise Http404("cid not found") - - exam_ids = answers.values_list("exam").distinct() - - exams = Exam.objects.filter(id__in=exam_ids) - - - return render( - request, - "anatomy/cid_scores.html", - { - "exams": exams, - "cid": cid, - }, - ) +#def cid_scores(request, pk): +# #exam = get_object_or_404(Exam, pk=pk) +# +# # TODO:Need some kind of test for cid +# cid = pk +# +# #questions = exam.exam_questions.all() +# answers = CidUserAnswer.objects.filter( +# cid=cid) +# +# +# if not answers: +# raise Http404("cid not found") +# +# exam_ids = answers.values_list("exam").distinct() +# +# exams = Exam.objects.filter(id__in=exam_ids) +# +# +# return render( +# request, +# "anatomy/cid_scores.html", +# { +# "exams": exams, +# "cid": cid, +# }, +# ) class AnatomyQuestionCreateBase(LoginRequiredMixin, CreateView): model = AnatomyQuestion diff --git a/physics/templates/physics/exam_scores.html b/physics/templates/physics/exam_scores.html index 5849ca1c..42f394f3 100644 --- a/physics/templates/physics/exam_scores.html +++ b/physics/templates/physics/exam_scores.html @@ -5,7 +5,7 @@

{{ exam.name }}

{% for user, value in user_answers_marks.items %} -

Candidate: {{ user_names|get_item:user }}

+

Candidate: {{ user_names|get_item:user }}

Answers: {% for ans, score in user_answers_and_marks|get_item:user %} {{ans}} ({{score}}),