Fixing label tags in a question of type 'wybor'
[edumed.git] / wtem / templates / wtem / exercises / edumed_wybor.html
index 0fe9600..5238c2f 100644 (file)
@@ -1,24 +1,46 @@
-<div class="exercise wybor" data-type="wybor">
+<div class="exercise exercise-wtem wybor" data-type="wybor" data-id="{{exercise.id}}">
 
     <h3>Zadanie {{no}}</h3>
 
+    {% autoescape off %}
     <div class="description">
         {% for para in exercise.description %}
             <p class="paragraph">
                 {{para}}
             </p>
         {% endfor %}
+        <span class="instruction">
+            {% if exercise.answer|length == 1 %}
+                Tylko jedna odpowiedź jest prawidłowa.
+            {% else %}
+                Zaznacz wszystkie prawidłowe odpowiedzi.
+            {% endif %}
+        </span>
     </div>
+    {% endautoescape %}
 
     <div class="question" data-no="1">
         <ol class="lista num">
             {% for option in exercise.options %}
                 <li class="question-piece" data-name="{{option.id}}">
-                    <input type="{% if exercise.answer|length == 1 %}radio{% else %}checkbox{% endif %}" name="{% if exercise.answer|length == 1 %}e{{no}}{% else %}q1_{{option.id}}{% endif %}" id="q1_{{option.id}}">
-                    <label for="{% if exercise.answer|length == 1 %}e{{no}}{% else %}q1_{{option.id}}{% endif %}">{{option.text}}</label>
+                    <input type="{% if exercise.answer|length == 1 %}radio{% else %}checkbox{% endif %}" name="{% if exercise.answer|length == 1 %}e{{no}}{% else %}e{{no}}_{{option.id}}{% endif %}" id="e{{no}}_{{option.id}}">
+                    <label for="e{{no}}_{{option.id}}">{{option.text}}</label>
                 </li>
             {% endfor %}
         </ol>
     </div>
 
+    {% if exercise.open_part %}
+    <div class="open_part">
+        <div class="description">
+            {% for para in exercise.open_part %}
+                <p class="paragraph">
+                    {{para}}
+                </p>
+            {% endfor %}
+        </div>
+        <textarea style="width: 100%; margin-top:10px;" rows="{{exercise.open_part_rows|default:10}}"></textarea>
+    </div>
+    {% endif %}
+
 </div>
\ No newline at end of file