This commit is contained in:
Ross
2021-12-23 22:43:27 +00:00
parent bdb5e19298
commit c6cf8a568e
6 changed files with 15 additions and 10 deletions
+1 -2
View File
@@ -46,8 +46,7 @@
<tr>
<th>Candidate</th>
{% for cid in cids %}
{% comment %} <th><a href="{% url 'anatomy:exam_scores_cid_user' exam.pk cid %}">{{cid}}</a></th> {% endcomment %}
<th>{{cid}}</th>
<th><a href="{% url 'anatomy:exam_scores_cid_user' exam.pk cid 'None' %}">{{cid}}</a></th>
{% endfor %}
</tr>
+3 -2
View File
@@ -46,14 +46,15 @@
<tr>
<th>Candidate</th>
{% for cid in cids %}
<th><a href="{% url 'longs:exam_scores_cid_user' exam.pk cid %}">{{cid}}</a></th>
<th><a href="{% url 'longs:exam_scores_cid_user' exam.pk cid 'None' %}">{{cid}}</a></th>
{% endfor %}
</tr>
</thead>
{% for question in questions %}
<tr>
<td><a href="{% url 'longs:mark_question_overview' exam_id=exam.pk sk=forloop.counter0 %}">Question {{forloop.counter}}</a></td>
<td><a href="{% url 'longs:mark_question_overview' exam_id=exam.pk sk=forloop.counter0 %}">Question
{{forloop.counter}}</a></td>
{% for ans, score in by_question|get_item:question %}
<td class="user-answer-score-{{score}}" title="answer score: {{score}}">{{score}}</td>
{% endfor %}
+8 -2
View File
@@ -1036,11 +1036,17 @@ def exam_scores_cid(request, pk):
)
def exam_scores_cid_user(request, pk, sk, passcode):
def exam_scores_cid_user(request, pk, cid, passcode):
exam = get_object_or_404(Exam, pk=pk)
# TODO:Need some kind of test for cid
cid = sk
if not exam.exam_mode:
raise Http404("Packet not in exam mode")
if not exam.check_cid_user(cid, passcode, request):
raise Http404("Error accessing exam")
questions = exam.exam_questions.all()
+1 -1
View File
@@ -36,7 +36,7 @@
<tr>
<th>Candidate</th>
{% for cid in cids %}
<th>{{cid}}</th>
<th><a href="{% url 'physics:exam_scores_cid_user' exam.pk cid 'None' %}">{{cid}}</a></th>
{% endfor %}
</thead>
</tr>
+1 -2
View File
@@ -47,8 +47,7 @@
<tr>
<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="{% url 'rapids:exam_scores_cid_user' exam.pk cid 'None' %}">{{cid}}</a></th>
{% endfor %}
</tr>
+1 -1
View File
@@ -36,7 +36,7 @@
<tr>
<th>Candidate</th>
{% for cid in cids %}
<th>{{cid}}</th>
<th><a href="{% url 'sbas:exam_scores_cid_user' exam.pk cid 'None' %}">{{cid}}</a></th>
{% endfor %}
</tr>