images and fixes for new test
[edumed.git] / wtem / templates / wtem / exercises / edumed_wybor.html
index edd9dad..2d021f0 100644 (file)
@@ -1,6 +1,9 @@
 <div class="exercise exercise-wtem wybor" data-type="wybor" data-id="{{exercise.id}}">
 
-    {% include "wtem/exercises/exercise_no.html" %}
+    {% if no %}
+        {% include "wtem/exercises/exercise_no.html" %}
+    {% endif %}
+
     {% autoescape off %}
     <div class="description">
         {% for para in exercise.description %}
                 {{para}}
             </p>
         {% endfor %}
-        {% if exercise.points %}
-            <span class="instruction">
-                {% if exercise.answer|length == 1 %}
-                    Tylko jedna odpowiedź jest prawidłowa.
-                {% else %}
-                    Zaznacz wszystkie prawidłowe odpowiedzi.
-                {% endif %}
-            </span>
-        {% endif %}
+        <span class="instruction">
+            Zaznacz każdą prawidłową odpowiedź (jedną lub więcej).
+        </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 %}e{{no}}_{{option.id}}{% endif %}" id="e{{no}}_{{option.id}}"{% if option.id|stringformat:"s" in exercise.saved_answer.closed_part %} checked="checked"{% endif %}>
-                    <label for="e{{no}}_{{option.id}}">{{option.text}}</label>
+                    <input type="checkbox" name="e{{no}}_{{option.id}}" id="e{{no}}_{{option.id}}"{% if option.id|stringformat:"s" in exercise.saved_answer.closed_part %} checked="checked"{% endif %}>
+                    <label for="e{{no}}_{{option.id}}">{{option.text|safe}}</label>
                 </li>
             {% endfor %}
         </ol>