fix numbering bug
[edumed.git] / wtem / templates / wtem / exercises / edumed_przyporzadkuj.html
1 <div class="exercise exercise-wtem przyporzadkuj" data-type="przyporzadkuj" data-id="{{exercise.id}}">
2
3     {% if no %}
4         {% include "wtem/exercises/exercise_no.html" %}
5     {% endif %}
6     
7     <div class="question" data-no="1">
8
9         <div class="description">
10         {% for para in exercise.description %}
11             <p class="paragraph">
12                 {{para}}
13             </p>
14
15         {% endfor %}
16         </div>
17
18         <p class="paragraph">{{exercise.buckets_name|default:"kategorie"|capfirst}}:</p>
19
20         <ul class="lista punkt predicate" data-name="kategorie">
21             {% for bucket in exercise.buckets %}
22                 <li data-predicate="{{bucket.id}}">
23                     {{bucket.title}}
24                     <ul class="subjects">
25                         <li class="placeholder multiple ui-droppable accepting"></li>
26                     </ul>
27                 </li>
28             {% endfor %}
29         </ul>
30         <br class="clr">
31
32         <div class="description" style="margin-bottom:10px;">
33             <p class="paragraph">{{exercise.items_name|capfirst}}:</p>
34             {% if not exercise.hide_default_instruction %}
35                 <span class="instruction">Przeciągnij i upuść numery odpowiedzi w wybranym polu powyżej.</span>
36             {% endif %}
37             {% if exercise.items_instruction %}
38                 <span class="instruction">{{exercise.items_instruction}}</span>
39             {% endif %}
40         </div>
41          
42         <ul class="lista punkt subject {% if exercise.items_inline %}wtem-items-inline{% endif %}" data-target="kategorie">
43             {% for item in exercise.items %}
44                 {% comment %}
45                 data-solution set to single bogus value only to indicate that this piece has no multiple solutions, not used otherwise (see: is_multiple in edumed.coffee). 
46                 {% endcomment %}
47                 
48                 {% if item.img or item.desc %}
49                     <li style="magin-bottom:5px;">
50                         <span data-solution="1" data-no="{{forloop.counter}}" data-id="{{item.id}}" class="question-piece draggable ui-draggable">{{item.text}}</span>
51                         
52                         {% if item.img %}
53                             {% if item.href %}
54                                 <a href="{% if not item.href_absolute %}/static/wtem/img/{% endif %}{{item.href}}" target="wtem_aside">
55                             {% endif %}
56                             
57                             <img src="/static/wtem/img/{{item.img}}"/>
58                             
59                             {% if item.href %}</a>{% endif %}
60                         {% endif %}
61                         {% if item.desc %}
62                             {{item.desc}}
63                         {% endif %}
64                     </li>
65                 {% else %}
66                     <li data-solution="1" data-no="{{forloop.counter}}" data-id="{{item.id}}" class="question-piece draggable ui-draggable">{{item.text}}</li>
67                 {% endif %}
68             
69             {% endfor %}
70         </ul>
71
72         <br class="clr">
73
74         {% if exercise.description_after %}
75             {% autoescape off %}
76             {% for para in exercise.description_after %}
77                 <p class="paragraph">
78                     {{para}}
79                 </p>
80             {% endfor %}
81             {% endautoescape %}
82         {% endif %}
83
84     </div>
85
86 </div>
87