fix numbering bug
[edumed.git] / wtem / templates / wtem / exercises / edumed_wybor_auto.html
1 <div class="exercise exercise-wtem wybor" data-type="wybor" data-id="{{exercise.id}}">
2
3     {% if no %}
4         {% include "wtem/exercises/exercise_no.html" %}
5     {% endif %}
6     {% autoescape off %}
7     <div class="description">
8         {% for para in exercise.description %}
9             <p class="paragraph">
10                 {{para}}
11             </p>
12         {% endfor %}
13         {% if exercise.points %}
14             <span class="instruction">
15                 {% if exercise.answer|length == 1 %}
16                     Tylko jedna odpowiedź jest prawidłowa.
17                 {% else %}
18                     Zaznacz wszystkie prawidłowe odpowiedzi.
19                 {% endif %}
20             </span>
21         {% endif %}
22     </div>
23     {% endautoescape %}
24     <div class="question" data-no="1">
25         <ol class="lista num">
26             {% for option in exercise.options %}
27                 <li class="question-piece" data-name="{{option.id}}">
28                     <input type="{% if exercise.answer|length == 1 %}radio{% else %}checkbox{% endif %}" name="{% if exercise.answer|length == 1 %}e{{no}}{% else %}e{{no}}_{{option.id}}{% endif %}" id="e{{no}}_{{option.id}}"{% if option.id|stringformat:"s" in exercise.saved_answer.closed_part %} checked="checked"{% endif %}>
29                     <label for="e{{no}}_{{option.id}}">{{option.text}}</label>
30                 </li>
31             {% endfor %}
32         </ol>
33     </div>
34
35     {% if exercise.open_part %}
36     <div class="open_part">
37         <div class="description">
38             {% for para in exercise.open_part %}
39                 <p class="paragraph">
40                     {{para}}
41                 </p>
42             {% endfor %}
43         </div>
44         <textarea style="width: 100%; margin-top:10px;" rows="{{exercise.open_part_rows|default:10}}">{{ exercise.saved_answer.open_part }}</textarea>
45     </div>
46     {% endif %}
47
48 </div>