25fa8e098084708024a8265cb234c805fc81c2c1
[edumed.git] / wtem / templates / wtem / exercises / open.html
1 <div class="exercise-wtem" data-type="open" data-id="{{exercise.id}}">
2
3 {% if not exercise.continuation %}
4 <h3>Zadanie {{exercise.id_show|default:exercise.id}} ({{ exercise.max_points }} pkt)</h3>
5 {% endif %}
6         
7     <div class="description">
8         {% autoescape off %}
9         {% for para in exercise.description %}
10             <p class="paragraph">
11                 {{para}}
12             </p>
13         {% endfor %}
14         {% endautoescape %}
15     </div>
16
17     {% if exercise.fields %}
18         {% for field in exercise.fields %}
19             <div class="wtem-open-field">
20                 <label class="wtem-caption">{{field.caption|safe}} <span class="label_suffix"></span></label>
21 {% if field.type == 'file' %}
22
23     <div style="margin: 15px auto; width:300px;">
24         <input style="float: left;" type="file" name="attachment_for_{{exercise.id}}__{{field.id}}"/>
25         <div style="clear:both;"></div>
26     </div>
27
28 {% else %}
29
30                 <textarea style="width: 100%;" rows="{{field.rows|default:10}}" data-field-id="{{field.id}}" {% if field.max_length %}maxlength="{{field.max_length}}"{% endif %} {% if field.input_id %}id="{{field.input_id}}"{% endif %}></textarea>
31
32 {% endif %}
33
34             </div>
35         {% endfor %}
36     {% else %}
37         <textarea style="width: 100%; margin-top:10px;" rows="{{field.rows|default:10}}" {% if field.max_length %}maxlength="{{field.max_length}}"{% endif %} {% if field.input_id %}id="#{{field.input_id}}"{% endif %}></textarea>
38     {% endif %}
39
40     {% if exercise.description_after %}
41         <div class="description">
42             {% autoescape off %}
43             {% for para in exercise.description_after %}
44                 <p class="paragraph">
45                     {{para}}
46                 </p>
47             {% endfor %}
48             {% endautoescape %}
49         </div>
50     {% endif%}
51
52 </div>