fix numbering bug
authorJan Szejko <janek37@gmail.com>
Thu, 16 Nov 2017 11:05:58 +0000 (12:05 +0100)
committerJan Szejko <janek37@gmail.com>
Thu, 16 Nov 2017 11:05:58 +0000 (12:05 +0100)
wtem/templates/wtem/exercises/edumed_prawdafalsz.html
wtem/templates/wtem/exercises/edumed_przyporzadkuj.html
wtem/templates/wtem/exercises/edumed_uporzadkuj.html
wtem/templates/wtem/exercises/edumed_wybor.html
wtem/templates/wtem/exercises/edumed_wybor_auto.html
wtem/templates/wtem/exercises/file_upload.html
wtem/templates/wtem/exercises/open.html
wtem/templates/wtem/single.html

index 67bf0ae..2b1802b 100644 (file)
@@ -1,6 +1,8 @@
 <div class="exercise exercise-wtem prawdafalsz" data-type="prawdafalsz" data-id="{{exercise.id}}">
 
-    {% include "wtem/exercises/exercise_no.html" %}
+    {% if no %}
+        {% include "wtem/exercises/exercise_no.html" %}
+    {% endif %}
 
     <div class="question" data-no="1">
         <div class="description">
index bdb17af..6f6ac21 100644 (file)
@@ -1,6 +1,8 @@
 <div class="exercise exercise-wtem przyporzadkuj" data-type="przyporzadkuj" data-id="{{exercise.id}}">
 
-    {% include "wtem/exercises/exercise_no.html" %}
+    {% if no %}
+        {% include "wtem/exercises/exercise_no.html" %}
+    {% endif %}
     
     <div class="question" data-no="1">
 
index 200271e..ba05c50 100644 (file)
@@ -1,6 +1,8 @@
 <div class="exercise exercise-wtem uporzadkuj" data-type="uporzadkuj" data-id="{{exercise.id}}">
 
-    {% include "wtem/exercises/exercise_no.html" %}
+    {% if no %}
+        {% include "wtem/exercises/exercise_no.html" %}
+    {% endif %}
 
     <div class="question" data-no="1">
         <div class="description">
index 2ac1e2c..0a87aca 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 %}
index edd9dad..0cd51f0 100644 (file)
@@ -1,6 +1,8 @@
 <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 %}
index b452070..a5c3782 100644 (file)
@@ -1,6 +1,8 @@
 <div class="exercise-wtem" data-type="file" data-id="{{exercise.id}}">
 
-    {% include "wtem/exercises/exercise_no.html" %}
+    {% if no %}
+        {% include "wtem/exercises/exercise_no.html" %}
+    {% endif %}
 
     <div class="description">
         {% for para in exercise.description %}
index c30a5b0..3f771fb 100644 (file)
@@ -1,6 +1,8 @@
 <div class="exercise-wtem" data-type="open" data-id="{{exercise.id}}">
 
-    {% include "wtem/exercises/exercise_no.html" %}
+    {% if no %}
+        {% include "wtem/exercises/exercise_no.html" %}
+    {% endif %}
 
     <div class="description">
         {% autoescape off %}
index 3380145..8bb12bd 100644 (file)
 
 <form method="post">
 
+{% include 'wtem/exercises/exercise_no.html' %}
 {% cache 300 wtem exercise.id %}
 {% with 'wtem/exercises/'|add:exercise.type|add:'.html' as template_name %}
-{% include  template_name with exercise=exercise %}
+{% include template_name with exercise=exercise no='' %}
 {% endwith %}
 {% endcache %}