Support for inline items in question 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             <span class="instruction">Przeciągnij odpowiedzi i upuść w wybranym polu.</span>
15         </div>
16
17         <p class="paragraph">{{exercise.buckets_name|default:"kategorie"|capfirst}}:</p>
18
19         <ul class="lista punkt predicate" data-name="kategorie">
20             {% for bucket in exercise.buckets %}
21                 <li data-predicate="{{bucket.id}}">
22                     {{bucket.title}}
23                     <ul class="subjects">
24                         <li class="placeholder multiple ui-droppable accepting"></li>
25                     </ul>
26                 </li>
27             {% endfor %}
28         </ul>
29         <br class="clr">
30
31         <div class="description" style="margin-bottom:10px;">
32             <p class="paragraph">{{exercise.items_name|capfirst}}:</p>
33         </div>
34          
35         <ul class="lista punkt subject {% if exercise.items_inline %}wtem-items-inline{% endif %}" data-target="kategorie">
36             {% for item in exercise.items %}
37                 {% comment %}
38                 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). 
39                 {% endcomment %}
40                 
41                 {% if item.img %}
42                     <li style="magin-bottom:5px;">
43                         <span data-solution="1" data-no="{{forloop.counter}}" data-id="{{item.id}}" class="question-piece draggable ui-draggable">{{item.text}}</span>
44                         
45                         {% if item.href %}
46                             <a href="/static/wtem/img/{{item.href}}">
47                         {% endif %}
48                         
49                         <img src="/static/wtem/img/{{item.img}}"/>
50                         
51                         {% if item.href %}</a>{% endif %}
52                     </li>
53                 {% else %}
54                     <li data-solution="1" data-no="{{forloop.counter}}" data-id="{{item.id}}" class="question-piece draggable ui-draggable">{{item.text}}</li>
55                 {% endif %}
56             
57             {% endfor %}
58         </ul>
59
60         <br class="clr">
61
62     </div>
63
64 </div>
65