fields on answer list
[edumed.git] / stage2 / templates / stage2 / answer_list.html
1 {% extends 'base.html' %}
2
3
4 {% block body %}
5   <h1>{% if marked %}Ocenione odpowiedzi{% else %}Odpowiedzi do oceny{% endif %}</h1>
6   <h2>{{ assignment.title }} (max {{ assignment.max_points }} pkt)</h2>
7   {% if assignment.is_active %}
8     <p><strong>Możliwość oceniania zostanie włączona po terminie wysyłania rozwiązań</strong></p>
9   {% else %}
10     {% if marked %}
11       <p><a href="{% url 'stage2_answer_list' assignment.id %}">Przejdź do odpowiedzi do oceny</a></p>
12     {% else %}
13       <p><a href="{% url 'stage2_marked_answers' assignment.id %}">Przejdź do ocenionych odpowiedzi</a></p>
14     {% endif %}
15   {% endif %}
16   <p>{% if not marked and not assignment.is_active %}Pozostało {% endif %}{{ answers|length }} odpowiedzi</p>
17   {% if field_counts %}
18     <ul>
19       {% for field_name, count in field_counts %}
20         <li>{{ field_name }}: {{ count }} odpowiedzi</li>
21       {% endfor %}
22     </ul>
23   {% endif %}
24   {% for answer in answers %}
25     <h3>{{ answer.participant }}</h3>
26     {% for label, value in answer.fields %}
27       <p>
28         <strong>{{ label }}</strong>: {{ value }}
29       </p>
30     {% endfor %}
31     {% for label, attachment in answer.attachments %}
32       <p>
33         <strong>{{ label }}</strong>:
34         {% if attachment.file %}
35           <a href="{% url 'stage2_expert_download' attachment.id %}">{{ attachment.filename }}</a>
36           ({{ attachment.file.size|filesizeformat }})
37         {% else %}
38           (nie wysłano pliku)
39         {% endif %}
40       </p>
41     {% endfor %}
42     {% if not assignment.is_active %}
43       <form method="post" action="{% url 'stage2_mark_answer' answer.id %}">
44         {% csrf_token %}
45         {{ answer.form.as_p }}
46         <input type="submit" value="Zapisz"/>
47       </form>
48     {% endif %}
49   {% endfor %}
50 {% endblock %}