]> git.parisson.com Git - teleforma.git/commitdiff
modify seminar scenario
authoryomguy <yomguy@parisson.com>
Fri, 21 Dec 2012 16:25:29 +0000 (17:25 +0100)
committeryomguy <yomguy@parisson.com>
Fri, 21 Dec 2012 16:25:29 +0000 (17:25 +0100)
teleforma/templates/teleforma/seminar_detail.html
teleforma/views/pro.py

index bde78eb8e7239620b5b90b1cd61567dac8801877..b9048190800e67ad4bc421d889bb160bf9b933ee 100644 (file)
@@ -123,8 +123,8 @@ $(function() {
            {% endif %}
           {% endwith %}
 
-         {% if validated %}
-          
+        
+         {% if seminar_progress == 100 %}
           {% with seminar.docs_correct as docs %}
            {% if docs.all.count > 1 %}
             {% with _("Step 5 : read these corrected documents") as title %}
@@ -142,11 +142,12 @@ $(function() {
             {% include "teleforma/inc/evaluation_form.html" %}
            {% endwith %}
           {% endwith %}
+         {% endif %}
 
+         {% if validated %}
            {% with _("Step 7 : download your testimonial") as title %}
             {% include "teleforma/inc/testimonial_list.html" %}
            {% endwith %}
-
          {% endif %}
 
       {% endblock course_content %}
index 0bd02c70b878463e0e258867da7d140b9218c369..075d92640b89b6b947905cba235fc2e3fa782528 100644 (file)
@@ -138,7 +138,7 @@ def seminar_progress(user, seminar):
     questions = Question.objects.filter(seminar=seminar, status=3)
     for question in questions:
         total += question.weight
-        answer = Answer.objects.filter(question=question, status=3, user=user, validated=True)
+        answer = Answer.objects.filter(question=question, status=3, user=user)
         if answer:
             progress += question.weight