Tweaking instructions
[edumed.git] / wtem / templates / wtem / exercises / edumed_przyporzadkuj.html
index c56dec0..67ad08b 100644 (file)
@@ -1,4 +1,4 @@
-<div class="exercise przyporzadkuj" data-type="przyporzadkuj">
+<div class="exercise exercise-wtem przyporzadkuj" data-type="przyporzadkuj" data-id="{{exercise.id}}">
 
     <h3>Zadanie {{no}}</h3>
     
@@ -11,7 +11,9 @@
             </p>
 
         {% endfor %}
-            <span class="instruction">Przeciągnij odpowiedzi i upuść w wybranym polu.</span>
+            {% if not exercise.hide_default_instruction %}
+                <span class="instruction">Przeciągnij odpowiedzi i upuść w wybranym polu.</span>
+            {% endif %}
         </div>
 
         <p class="paragraph">{{exercise.buckets_name|default:"kategorie"|capfirst}}:</p>
         </ul>
         <br class="clr">
 
-        <div class="description">
+        <div class="description" style="margin-bottom:10px;">
             <p class="paragraph">{{exercise.items_name|capfirst}}:</p>
+            {% if exercise.items_instruction %}
+                <span class="instruction">{{exercise.items_instruction}}</span>
+            {% endif %}
         </div>
          
-        <ul class="lista punkt subject" data-target="kategorie">
+        <ul class="lista punkt subject {% if exercise.items_inline %}wtem-items-inline{% endif %}" data-target="kategorie">
             {% for item in exercise.items %}
-                <!-- 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). -->
-                <li data-solution="1" data-no="{{forloop.counter}}" data-id="{{item.id}}" class="question-piece draggable ui-draggable">{{item.text}}</li>
+                {% comment %}
+                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). 
+                {% endcomment %}
+                
+                {% if item.img %}
+                    <li style="magin-bottom:5px;">
+                        <span data-solution="1" data-no="{{forloop.counter}}" data-id="{{item.id}}" class="question-piece draggable ui-draggable">{{item.text}}</span>
+                        
+                        {% if item.href %}
+                            <a href="/static/wtem/img/{{item.href}}">
+                        {% endif %}
+                        
+                        <img src="/static/wtem/img/{{item.img}}"/>
+                        
+                        {% if item.href %}</a>{% endif %}
+                    </li>
+                {% else %}
+                    <li data-solution="1" data-no="{{forloop.counter}}" data-id="{{item.id}}" class="question-piece draggable ui-draggable">{{item.text}}</li>
+                {% endif %}
+            
             {% endfor %}
         </ul>