Merge WTEM support into master
[edumed.git] / wtem / templates / wtem / exercises / edumed_przyporzadkuj.html
diff --git a/wtem/templates/wtem/exercises/edumed_przyporzadkuj.html b/wtem/templates/wtem/exercises/edumed_przyporzadkuj.html
new file mode 100644 (file)
index 0000000..00140e3
--- /dev/null
@@ -0,0 +1,85 @@
+<div class="exercise exercise-wtem przyporzadkuj" data-type="przyporzadkuj" data-id="{{exercise.id}}">
+
+    <h3>Zadanie {{no}}</h3>
+    
+    <div class="question" data-no="1">
+
+        <div class="description">
+        {% for para in exercise.description %}
+            <p class="paragraph">
+                {{para}}
+            </p>
+
+        {% endfor %}
+        </div>
+
+        <p class="paragraph">{{exercise.buckets_name|default:"kategorie"|capfirst}}:</p>
+
+        <ul class="lista punkt predicate" data-name="kategorie">
+            {% for bucket in exercise.buckets %}
+                <li data-predicate="{{bucket.id}}">
+                    {{bucket.title}}
+                    <ul class="subjects">
+                        <li class="placeholder multiple ui-droppable accepting"></li>
+                    </ul>
+                </li>
+            {% endfor %}
+        </ul>
+        <br class="clr">
+
+        <div class="description" style="margin-bottom:10px;">
+            <p class="paragraph">{{exercise.items_name|capfirst}}:</p>
+            {% if not exercise.hide_default_instruction %}
+                <span class="instruction">Przeciągnij i upuść numery odpowiedzi w wybranym polu powyżej.</span>
+            {% endif %}
+            {% if exercise.items_instruction %}
+                <span class="instruction">{{exercise.items_instruction}}</span>
+            {% endif %}
+        </div>
+         
+        <ul class="lista punkt subject {% if exercise.items_inline %}wtem-items-inline{% endif %}" data-target="kategorie">
+            {% for item in exercise.items %}
+                {% 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 or item.desc %}
+                    <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.img %}
+                            {% if item.href %}
+                                <a href="{% if not item.href_absolute %}/static/wtem/img/{% endif %}{{item.href}}" target="wtem_aside">
+                            {% endif %}
+                            
+                            <img src="/static/wtem/img/{{item.img}}"/>
+                            
+                            {% if item.href %}</a>{% endif %}
+                        {% endif %}
+                        {% if item.desc %}
+                            {{item.desc}}
+                        {% 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>
+
+        <br class="clr">
+
+        {% if exercise.description_after %}
+            {% autoescape off %}
+            {% for para in exercise.description_after %}
+                <p class="paragraph">
+                    {{para}}
+                </p>
+            {% endfor %}
+            {% endautoescape %}
+        {% endif %}
+
+    </div>
+
+</div>
+