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