]> git.parisson.com Git - teleforma.git/commitdiff
fix gender, some messages, bugfix non treaded answers
authoryomguy <yomguy@parisson.com>
Tue, 19 Feb 2013 16:21:17 +0000 (17:21 +0100)
committeryomguy <yomguy@parisson.com>
Tue, 19 Feb 2013 16:21:17 +0000 (17:21 +0100)
teleforma/locale/fr/LC_MESSAGES/django.mo
teleforma/locale/fr/LC_MESSAGES/django.po
teleforma/templates/teleforma/answer_detail.html
teleforma/templates/teleforma/answer_form.html
teleforma/templates/teleforma/messages/answer_rejected.txt
teleforma/templates/teleforma/messages/answer_validated.txt
teleforma/templates/teleforma/messages/seminar_validated.txt
teleforma/templates/teleforma/seminar_testimonial.html
teleforma/templatetags/teleforma_tags.py
teleforma/views/pro.py

index b0a255c9180e83187dfbbc49a13fd0c3c5a3fc6d..f09bcd103286a908fead08cc3a2eebf09b53b0b2 100644 (file)
Binary files a/teleforma/locale/fr/LC_MESSAGES/django.mo and b/teleforma/locale/fr/LC_MESSAGES/django.mo differ
index 44546eacf136f0dbe28a3b66dc0d8e8df1812936..758e2cc7e16dbe85199936da1ff2cdc1f906b09d 100644 (file)
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-19 10:22+0100\n"
+"POT-Creation-Date: 2013-02-19 16:45+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: Guillaume Pellerin <yomguy@parisson.com>\n"
 "Language-Team: LANGUAGE <lists@parisson.com>\n"
@@ -404,7 +404,7 @@ msgstr "documents corrigés"
 msgid "form"
 msgstr "formulaire"
 
-#: models/pro.py:130 templates/teleforma/answer_form.html:104
+#: models/pro.py:130 templates/teleforma/answer_form.html:110
 #: templates/teleforma/seminar_detail.html:158
 #: templates/teleforma/testimonials.html:58
 #: templates/teleforma/inc/answer_list.html:14
@@ -453,7 +453,7 @@ msgid "date validated"
 msgstr "date de validation"
 
 #: models/pro.py:185 templates/teleforma/answer_detail.html:43
-#: templates/teleforma/answer_form.html:107
+#: templates/teleforma/answer_form.html:113
 msgid "Answer"
 msgstr "Réponse à la consultation"
 
@@ -780,7 +780,7 @@ msgstr "Rejeté"
 msgid ":"
 msgstr ""
 
-#: templates/postman/view.html:36
+#: templates/postman/view.html:36 templates/teleforma/answer_form.html:72
 #: templates/teleforma/seminar_media_audio.html:8
 #: templates/teleforma/seminar_media_video.html:68
 msgid "Back"
@@ -808,7 +808,7 @@ msgstr "Vous n'avez PAS enregistré votre consultation"
 msgid "My steps"
 msgstr "Mes étapes"
 
-#: templates/teleforma/answer_form.html:74
+#: templates/teleforma/answer_form.html:80
 #: templates/teleforma/evaluation_form.html:10
 #: templates/teleforma/seminar_detail.html:77
 #: templates/teleforma/seminar_detail.html:86
@@ -824,35 +824,35 @@ msgstr "Mes étapes"
 msgid "Step"
 msgstr "Étape"
 
-#: templates/teleforma/answer_form.html:74
+#: templates/teleforma/answer_form.html:80
 #: templates/teleforma/seminar_detail.html:105
 msgid "answer to this question"
 msgstr "réaliser cette consultation fictive"
 
-#: templates/teleforma/answer_form.html:74
+#: templates/teleforma/answer_form.html:80
 msgid "characters"
 msgstr "caractères"
 
-#: templates/teleforma/answer_form.html:74
+#: templates/teleforma/answer_form.html:80
 msgid "minimum"
 msgstr "minimum"
 
-#: templates/teleforma/answer_form.html:88
+#: templates/teleforma/answer_form.html:94
 msgid "Save"
 msgstr ""
 
-#: templates/teleforma/answer_form.html:89
+#: templates/teleforma/answer_form.html:95
 msgid "Submit it"
 msgstr "Soumettre"
 
 # #: templates/teleforma/seminar_detail.html:152
-#: templates/teleforma/answer_form.html:97
+#: templates/teleforma/answer_form.html:103
 #: templates/teleforma/seminar_detail.html:152
 #: templates/teleforma/seminars.html:134
 msgid "Progressions"
 msgstr "Progressions"
 
-#: templates/teleforma/answer_form.html:101
+#: templates/teleforma/answer_form.html:107
 #: templates/teleforma/seminar_detail.html:155
 #: templates/teleforma/seminars.html:137
 msgid "General"
@@ -1390,9 +1390,8 @@ msgid ""
 "\n"
 "You have then achieved the step 4 of your training.\n"
 "\n"
-"Now read the corrected document of all questions (step 5) and evaluate the "
-"training (step 6) in order to obtain your testimonial (step 7) following "
-"this link:\n"
+"Now read the corrected document of each questions (step 5) following this "
+"link:\n"
 "\n"
 "http://%(domain)s%(path)s\n"
 "\n"
@@ -1410,8 +1409,7 @@ msgstr ""
 "Vous avez achevé l’étape 4 de votre formation.\n"
 "\n"
 "Consultez dès à présent le corrigé-type des consultations fictives (étape 5) "
-"et évaluez la formation suivie (étape 6) afin d’obtenir votre attestation "
-"(étape 7) en suivant ce lien :\n"
+"en suivant ce lien :\n"
 "\n"
 "http://%(domain)s%(path)s\n"
 "\n"
@@ -1711,18 +1709,21 @@ msgstr ""
 "télécharger votre attestation de formation ci-dessous."
 
 #: views/pro.py:184
-msgid "You have successfully saved your answer"
-msgstr "Vous avez enregistré votre consultation avec succès"
+msgid "You have successfully saved your answer."
+msgstr "Vous avez enregistré votre consultation avec succès."
 
 #: views/pro.py:186
-msgid "You have successfully submitted your answer"
-msgstr "Vous avez soumis votre consultation avec succès"
+msgid "You have successfully submitted your answer."
+msgstr ""
+"Vous avez soumis votre consultation avec succès. Vous recevrez un message "
+"dès que celle-ci aura été validée par notre équipe pédagogique (48 heures "
+"ouvrées maximum)."
 
 #: views/pro.py:190
 msgid "Your submission has not been saved correctly. Please try again."
 msgstr ""
 "Votre consultation n'a pas été enregistrée correctement, veuillez réessayer "
-"SVP."
+"s'il vous plaît."
 
 #: views/pro.py:301 views/pro.py:358 views/pro.py:402
 msgid "Subtitle"
index f908717cd2473b26f039afb461839ee9506c1c1b..ed9b04da50e2933e2d4e347b1c20db67b6f13d91 100644 (file)
@@ -40,7 +40,7 @@ $('#reject').unbind('click').click(function() {
 
 <div class="course_content">
 <div class="course_subtitle">
-   <h3><img src="{{ STATIC_URL }}telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Answer" %}</h3>
+   <h3><img src="{{ STATIC_URL }}telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Answer" %}{% if answer.question.rank %}n° {{ answer.question.rank }}{% endif %}</h3>
   </div>
   <div style="text-align: justify; padding: .5em;">
     {{ answer.answer|safe }}
@@ -50,7 +50,7 @@ $('#reject').unbind('click').click(function() {
 <br />
 
 {% if user.is_staff %}
-<a id="validate" href="#" class="component_icon button icon_ok">{% trans " validate" %}</a> 
+<a id="validate" href="#" class="component_icon button icon_ok">{% trans " validate" %}</a>
 <a id="reject" href="#" class="component_icon button icon_delete">{% trans " reject" %}</a>
 {% endif %}
 
index eee7e8f35d2439b244a4801ca36e8eb573c25df7..86ce17aab7ac223ddcd71789dfb98d86ce8e8ea7 100644 (file)
@@ -15,10 +15,10 @@ $(document).ready(function(){
 });
 {% endif %}
 
-$(document).ready(function(){   
+$(document).ready(function(){
     //default usage
     $("#id_answer").charCount({
-        necessary: {{question.min_nchar}},            
+        necessary: {{question.min_nchar}},
         counterText: gettext('Characters')+' : ',
         });
     });
@@ -32,11 +32,11 @@ $(document).ready(function(){
           new Messi(gettext('You must reach the required number of characters.'), {buttons: [{id: 0, label: gettext('OK'), val: 'X'}], modal: true});
         }
         if (c.hasClass('exceed')){
-            $('#id_status').val("3"); 
-            $('#_AnswerForm').submit(); 
+            $('#id_status').val("3");
+            $('#_AnswerForm').submit();
         }
       });
-    
+
     var b2 = $('#save_button');
     b2.unbind('click').click(function() {
       $(window).unbind('beforeunload');
@@ -67,6 +67,12 @@ $(document).ready(function(){
 </div>
 {% endblock submodules %}
 
+{% block module-action %}
+<div class="module_action">
+ <a href="{% url teleforma-seminar-detail seminar.id %}" class="component_icon button icon_previous">&nbsp;{% trans "Back" %}</a>
+</div>
+{% endblock module-action %}
+
 {% block course_content %}
 
 <div class="course_content">
@@ -77,7 +83,7 @@ $(document).ready(function(){
     {{ question.question|safe }}
   </div>
 </div>
-  
+
 <br />
 <form method="post" id="_AnswerForm" action="">{% csrf_token %}
 {{ form }}
index 0895a3e712f695007a3532ef34af5a9635a1fe43..330106d25de9597341d70c6c9ca30f59bc6001e5 100644 (file)
@@ -1,4 +1,4 @@
-{% load i18n %}{% blocktrans %}{{ gender }} {{ first_name }} {{ last_name }},
+{% load i18n %}{% blocktrans %}{{ gender }} {{ last_name }},
 
 We are sorry we cannot validate your answer n°{{ rank }} of the e-learning seminar "{{ title }}".
 
index 13609ac6fdd4145636551a787d817eb0f1f411a1..4af2424da177252bc81317f0b6caf10b6301a472 100644 (file)
@@ -1,4 +1,4 @@
-{% load i18n %}{% blocktrans %}{{ gender }} {{ first_name }} {{ last_name }},
+{% load i18n %}{% blocktrans %}{{ gender }} {{ last_name }},
 
 Your answer to the question n°{{ rank }} of the e-learning seminar "{{ title }}" has been validated.
 
index 3610296534bb4165706d4d42a7bf32b4d54d5696..a64071fd6f3494a19c204a9d0f2dcf35b1392287 100644 (file)
@@ -1,10 +1,10 @@
-{% load i18n %}{% blocktrans %}{{ gender }} {{ first_name }} {{ last_name }},
+{% load i18n %}{% blocktrans %}{{ gender }} {{ last_name }},
 
 Your answer to the question n°{{ rank }} of the e-learning seminar "{{ title }}" has been validated.
 
 You have then achieved the step 4 of your training.
 
-Now read the corrected document of all questions (step 5) and evaluate the training (step 6) in order to obtain your testimonial (step 7) following this link:
+Now read the corrected document of each questions (step 5) following this link:
 
 http://{{ domain }}{{ path }}
 
index 97f0515e3baafdad5ecc75e7dbae9201ab0df9c7..b1d4aa95dbdac2e96110aae2f0b15f644a5db894 100644 (file)
@@ -34,7 +34,7 @@
       <tr><td class="bold">{% trans "Last name" %} : </td><td>{{ user.last_name|upper }}</td></tr>
       <tr><td class="bold">{% trans "First name" %} : </td><td>{{ user.first_name|upper }}</td></tr>
       <tr><td class="bold">{% trans "Address" %} : </td><td>{{ user.auditor.all.0.address }} {{ user.auditor.all.0.postal_code }} {{ user.auditor.all.0.city }}</td></tr>
-      <tr><td class="bold">{% trans "Sujet" %} : </td><td>{{ seminar.title }} {% if seminar.rank %} n°{{seminar.rank}}{% endif %}</td></tr>
+      <tr><td class="bold">{% trans "Sujet" %} : </td><td>{{ seminar.title }}</td></tr>
       <tr><td class="bold">{% trans "Course" %} : </td><td>{{ seminar.course }}</td></tr>
       <tr><td class="bold">{% trans "Training type" %} : </td><td>E-learning</td></tr>
       <tr><td class="bold">{% trans "Duration" %} : </td><td>{{ seminar.duration|hours }} {% trans "hours" %}</td></tr>
index 0ce825e9fcbf60cfb5e067076f13423a022bbdce..e51f2ad2876b79b30ce6e81810821ed49d10c059 100644 (file)
@@ -302,7 +302,7 @@ def fancy_duration(duration):
 
 @register.simple_tag
 def untreated_answer_count():
-    answers = Answer.objects.filter(treated=False)
+    answers = Answer.objects.filter(treated=False, status=3)
     if answers:
         return ' (' + str(len(answers)) + ')'
     else:
index 566b27739f347bd0408d89ea9515b807d0cce4e3..d025ee1f3fbe335daf10625d59216f23cb3dfa5e 100644 (file)
@@ -181,9 +181,9 @@ class AnswerView(SeminarAccessMixin, FormView):
         answer.question = self.question
         answer.save()
         if answer.status <= 2:
-            messages.info(self.request, _("You have successfully saved your answer"))
+            messages.info(self.request, _("You have successfully saved your answer."))
         elif answer.status == 3:
-            messages.info(self.request, _("You have successfully submitted your answer"))
+            messages.info(self.request, _("You have successfully submitted your answer."))
         return super(AnswerView, self).form_valid(form)
 
     def form_invalid(self, form):
@@ -304,7 +304,7 @@ class AnswersView(ListView):
 
         auditor = user.auditor.all()
         if auditor:
-            gender = unicode(_(auditor[0].gender))
+            gender = auditor[0].get_gender_display()
         else:
             gender = ''
         context['gender'] = gender
@@ -361,9 +361,10 @@ class AnswersView(ListView):
 
         auditor = user.auditor.all()
         if auditor:
-            gender = unicode(_(auditor[0].gender))
+            gender = auditor[0].get_gender_display()
         else:
             gender = ''
+
         context['gender'] = gender
         context['first_name'] = user.first_name
         context['last_name'] = user.last_name
@@ -398,17 +399,20 @@ class AnswerDetailViewTest(DetailView):
         sender = self.request.user
         site = Site.objects.get_current()
         path= reverse('teleforma-question-answer', kwargs={'id': seminar.id, 'pk': answer.question.id})
+        organization = seminar.course.department.name
+
         if answer.question.seminar.sub_title:
             title = unicode(_('Subtitle')) + ' : ' + seminar.sub_title
         else:
             title = unicode(_('Course')) + ' : ' + seminar.course.title
-        organization = seminar.course.department.name
+
         auditor = user.auditor.all()
         if auditor:
-            context['gender'] = auditor[0].gender
+            context['gender'] = auditor[0].get_gender_display()
         else:
-            context['gender'] = user.first_name
-        context['lastname'] = user.last_name
+            context['gender'] = ''
+
+        context['last_name'] = user.last_name
         context['rank'] = answer.question.rank
         context['domain'] = site.name
         context['path'] = path