fix links
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% 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 'cid_scores' user %}">{{ user_names|get_item:user }}</a></h3>
|
||||
<!-- Answers: {{ user_answers_and_marks|get_item:user }}-->
|
||||
Answers: {% for ans, score in user_answers_and_marks|get_item:user %}
|
||||
{{ans}} ({{score}}),
|
||||
|
||||
+27
-27
@@ -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
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<h2>{{ exam.name }}</h2>
|
||||
|
||||
{% for user, value in user_answers_marks.items %}
|
||||
<h3>Candidate: <a href="{% url 'physics:cid_scores' user %}">{{ user_names|get_item:user }}</a></h3>
|
||||
<h3>Candidate: <a href="{% url 'cid_scores' user %}">{{ user_names|get_item:user }}</a></h3>
|
||||
<!-- Answers: {{ user_answers_and_marks|get_item:user }}-->
|
||||
Answers: {% for ans, score in user_answers_and_marks|get_item:user %}
|
||||
{{ans}} ({{score}}),
|
||||
|
||||
Reference in New Issue
Block a user