fix links
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for user, value in user_answers_marks.items %}
|
{% 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: {{ user_answers_and_marks|get_item:user }}-->
|
||||||
Answers: {% for ans, score in user_answers_and_marks|get_item:user %}
|
Answers: {% for ans, score in user_answers_and_marks|get_item:user %}
|
||||||
{{ans}} ({{score}}),
|
{{ans}} ({{score}}),
|
||||||
|
|||||||
+27
-27
@@ -762,33 +762,33 @@ def exam_scores(request, pk):
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
def cid_scores(request, pk):
|
#def cid_scores(request, pk):
|
||||||
#exam = get_object_or_404(Exam, pk=pk)
|
# #exam = get_object_or_404(Exam, pk=pk)
|
||||||
|
#
|
||||||
# TODO:Need some kind of test for cid
|
# # TODO:Need some kind of test for cid
|
||||||
cid = pk
|
# cid = pk
|
||||||
|
#
|
||||||
#questions = exam.exam_questions.all()
|
# #questions = exam.exam_questions.all()
|
||||||
answers = CidUserAnswer.objects.filter(
|
# answers = CidUserAnswer.objects.filter(
|
||||||
cid=cid)
|
# cid=cid)
|
||||||
|
#
|
||||||
|
#
|
||||||
if not answers:
|
# if not answers:
|
||||||
raise Http404("cid not found")
|
# raise Http404("cid not found")
|
||||||
|
#
|
||||||
exam_ids = answers.values_list("exam").distinct()
|
# exam_ids = answers.values_list("exam").distinct()
|
||||||
|
#
|
||||||
exams = Exam.objects.filter(id__in=exam_ids)
|
# exams = Exam.objects.filter(id__in=exam_ids)
|
||||||
|
#
|
||||||
|
#
|
||||||
return render(
|
# return render(
|
||||||
request,
|
# request,
|
||||||
"anatomy/cid_scores.html",
|
# "anatomy/cid_scores.html",
|
||||||
{
|
# {
|
||||||
"exams": exams,
|
# "exams": exams,
|
||||||
"cid": cid,
|
# "cid": cid,
|
||||||
},
|
# },
|
||||||
)
|
# )
|
||||||
|
|
||||||
class AnatomyQuestionCreateBase(LoginRequiredMixin, CreateView):
|
class AnatomyQuestionCreateBase(LoginRequiredMixin, CreateView):
|
||||||
model = AnatomyQuestion
|
model = AnatomyQuestion
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<h2>{{ exam.name }}</h2>
|
<h2>{{ exam.name }}</h2>
|
||||||
|
|
||||||
{% for user, value in user_answers_marks.items %}
|
{% 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: {{ user_answers_and_marks|get_item:user }}-->
|
||||||
Answers: {% for ans, score in user_answers_and_marks|get_item:user %}
|
Answers: {% for ans, score in user_answers_and_marks|get_item:user %}
|
||||||
{{ans}} ({{score}}),
|
{{ans}} ({{score}}),
|
||||||
|
|||||||
Reference in New Issue
Block a user