]> git.parisson.com Git - teleforma.git/commitdiff
update answer validated and rejected messages, styles
authoryomguy <yomguy@parisson.com>
Mon, 21 Jan 2013 16:29:48 +0000 (17:29 +0100)
committeryomguy <yomguy@parisson.com>
Mon, 21 Jan 2013 16:29:48 +0000 (17:29 +0100)
teleforma/locale/fr/LC_MESSAGES/django.mo
teleforma/locale/fr/LC_MESSAGES/django.po
teleforma/static/teleforma/css/teleforma.css
teleforma/templates/postman/view.html
teleforma/templates/teleforma/answer_detail.html
teleforma/templates/teleforma/messages/answer_rejected.txt
teleforma/templates/teleforma/messages/answer_validated.txt
teleforma/templates/teleforma/messages/seminar_validated.txt
teleforma/urls.py
teleforma/views/pro.py

index 01676e072e0e953fba6e8fa3294ad3177a3cbab1..3a945420b29982a19875c802315322a92f490814 100644 (file)
Binary files a/teleforma/locale/fr/LC_MESSAGES/django.mo and b/teleforma/locale/fr/LC_MESSAGES/django.mo differ
index 71f4eb031b39f6bbdca7373bf0a3db8afb9052da..45bc416688ee94941aa187b324cfb8e72832ac1e 100644 (file)
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-01-17 17:49+0100\n"
+"POT-Creation-Date: 2013-01-21 17:08+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"
@@ -17,7 +17,7 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1)\n"
 
 #: models/ae.py:46 models/core.py:202 models/crfpa.py:108 models/crfpa.py:146
-#: models/pro.py:142 models/pro.py:186 models/pro.py:201
+#: models/pro.py:142 models/pro.py:186 models/pro.py:201 models/pro.py:238
 msgid "user"
 msgstr "utilisateur"
 
@@ -56,11 +56,11 @@ msgstr "Publié"
 
 #: models/core.py:85
 msgid "Mr."
-msgstr "Mr"
+msgstr "Monsieur"
 
 #: models/core.py:85
 msgid "Mrs."
-msgstr "Mme"
+msgstr "Madame"
 
 #: models/core.py:94 models/core.py:106 models/core.py:129 models/core.py:141
 #: models/core.py:186 models/core.py:223 models/core.py:327 models/crfpa.py:47
@@ -193,6 +193,7 @@ msgid "credits"
 msgstr "crédits"
 
 #: models/core.py:310 models/pro.py:96 models/pro.py:149 models/pro.py:192
+#: models/pro.py:239
 msgid "date added"
 msgstr "date d'ajout"
 
@@ -400,7 +401,7 @@ msgstr "formulaire"
 msgid "Seminar"
 msgstr "Sémimaire"
 
-#: models/pro.py:122 models/pro.py:185
+#: models/pro.py:122 models/pro.py:185 models/pro.py:237
 msgid "seminar"
 msgstr "séminaire"
 
@@ -420,12 +421,12 @@ msgstr "status"
 msgid "Question"
 msgstr "Question"
 
-#: models/pro.py:144
+#: models/pro.py:144 views/pro.py:291
 msgid "answer"
 msgstr "réponse"
 
 #: models/pro.py:146 templates/teleforma/seminar_detail.html:50
-#: templates/teleforma/seminars.html:98
+#: templates/teleforma/seminars.html:98 views/pro.py:292
 msgid "validated"
 msgstr "validé"
 
@@ -437,7 +438,7 @@ msgstr "date de soumission"
 msgid "date validated"
 msgstr "date de validation"
 
-#: models/pro.py:162 templates/teleforma/answer_detail.html:28
+#: models/pro.py:162 templates/teleforma/answer_detail.html:43
 #: templates/teleforma/answer_form.html:105
 msgid "Answer"
 msgstr "Réponse"
@@ -456,7 +457,7 @@ msgstr "Modèle d'attestation"
 
 #: models/pro.py:196 templates/teleforma/seminar_testimonial.html:13
 #: templates/teleforma/inc/testimonial_list.html:7
-#: templates/teleforma/inc/testimonial_step.html:7 views/pro.py:502
+#: templates/teleforma/inc/testimonial_step.html:7 views/pro.py:582
 msgid "Testimonial"
 msgstr "Attestation"
 
@@ -484,6 +485,14 @@ msgstr "Fax"
 msgid "Auditor"
 msgstr "Auditeur"
 
+#: models/pro.py:246
+msgid "Seminar revision"
+msgstr "Révision des sémimaires"
+
+#: models/pro.py:247
+msgid "Seminar revisions"
+msgstr "Révisions des sémimaires"
+
 #: templates/404.html:10
 msgid "Page not found"
 msgstr "Page non trouvée"
@@ -750,11 +759,11 @@ msgstr ""
 msgid "Write"
 msgstr ""
 
-#: templates/teleforma/answer_detail.html:38
+#: templates/teleforma/answer_detail.html:53
 msgid " validate"
 msgstr "valider"
 
-#: templates/teleforma/answer_detail.html:39
+#: templates/teleforma/answer_detail.html:54
 msgid " reject"
 msgstr " rejeter"
 
@@ -929,7 +938,8 @@ msgstr "Audio"
 
 #: templates/teleforma/course_conference.html:70
 #: templates/teleforma/course_media.html:130
-#: templates/teleforma/seminar_testimonial.html:38
+#: templates/teleforma/seminar_testimonial.html:38 views/pro.py:320
+#: views/pro.py:362
 msgid "Course"
 msgstr "Matière"
 
@@ -1264,42 +1274,120 @@ msgstr "validé"
 msgid "duration"
 msgstr "durée"
 
-#: templates/teleforma/messages/answer_rejected.txt:2
+#: templates/teleforma/messages/answer_rejected.txt:1
+#, python-format
 msgid ""
-"Sorry!\n"
+"%(gender)s %(lastname)s,\n"
+"\n"
+"We are sorry we cannot validate your answer n°%(rank)s of the e-learning "
+"seminar \"%(title)s\".\n"
 "\n"
-"Your answer has been rejected. \n"
-"You can work and try again following this link:\n"
+"This validation is a requisite to allow us to deliver you a testimonial for "
+"this training. However, your submitted answer can not be taken into account. "
+"We encourage you to complete your answer following this link:\n"
+"\n"
+"http://%(domain)s%(path)s\n"
+"\n"
+"We remind you that you absolutely need to terminate your training before "
+"%(date)s.\n"
+"\n"
+"The team of the %(organization)s thank you for your confidence and we remain "
+"at your disposal for further information.\n"
 msgstr ""
-"Nous sommes désolés!\n"
+"%(gender)s %(lastname)s,\n"
+"\n"
+"Nous sommes au regret de ne pouvoir valider votre réponse à la consultation n"
+"°%(rank)s du séminaire e-learning \"%(title)s\".\n"
 "\n"
-"Votre consultation n'a pas été validée.\n"
-"Vous pouvez la re-travailler et la soumettre en suivant ce lien :\n"
+"En effet, la validation des acquis de la formation e-learning que vous avez "
+"suivie est une étape nécessaire pour permettre à Pro-Barreau de vous "
+"délivrer une attestation de formation. Pour valider cette étape, vous devez "
+"répondre aux consultations fictives. Or, la réponse soumise ne peut être "
+"prise en compte. Aussi, nous prions-vous de bien vouloir compléter votre "
+"réponse en suivant ce lien :\n"
+"\n"
+"http://%(domain)s%(path)s\n"
+"\n"
+"Nous vous rappelons que vous devez impérativement achever toutes les étapes "
+"de votre formation avant le %(date)s.\n"
+"\n"
+"L’équipe e-learning de %(organization)s vous remercie de votre confiance et "
+"reste à votre disposition pour renseignement complémentaire.\n"
 
-#: templates/teleforma/messages/answer_validated.txt:2
+#: templates/teleforma/messages/answer_validated.txt:1
+#, python-format
 msgid ""
-"Congratulations!\n"
+"%(gender)s %(lastname)s,\n"
+"\n"
+"Your answer to the question n°%(rank)s of the e-learning seminar \"%(title)s"
+"\" has been validated.\n"
+"\n"
+"You can now continue to next step following this link:\n"
+"\n"
+"http://%(domain)s%(path)s\n"
 "\n"
-"Your answer has been validated. \n"
-"You can go to the next step of your seminar following this link:\n"
+"We remind you that you absolutely need to terminate all steps of your "
+"training before %(date)s.\n"
+"\n"
+"The team of the %(organization)s thank you for your confidence and we remain "
+"at your disposal for further information.\n"
 msgstr ""
-"Félicitations!\n"
+"%(gender)s %(lastname)s,\n"
+"\n"
+"Votre réponse à la consultation n°%(rank)s du séminaire e-learning "
+"\"%(title)s\" a été validée.\n"
+"\n"
+"Vous pouvez dès à présent poursuivre votre formation en passant à l’étape "
+"suivante, en suivant ce lien :\n"
+"\n"
+"http://%(domain)s%(path)s\n"
 "\n"
-"Votre dernière consultation a été validée.\n"
-"Vous pouvez accéder à la prochaine étape de votre séminaire en suivant ce "
-"lien :\n"
+"Nous vous rappelons que vous devez impérativement achever toutes les étapes "
+"de votre formation avant le %(date)s.\n"
+"\n"
+"L’équipe e-learning de %(organization)s vous remercie de votre confiance et "
+"reste à votre disposition pour renseignement complémentaire.\n"
 
-#: templates/teleforma/messages/seminar_validated.txt:2
+#: templates/teleforma/messages/seminar_validated.txt:1
+#, python-format
 msgid ""
-"Congratulations!\n"
+"%(gender)s %(lastname)s,\n"
+"\n"
+"Your answer to the question n°%(rank)s of the e-learning seminar \"%(title)s"
+"\" has been validated.\n"
 "\n"
-"Your seminar has been validated.                \n"
-"You can now download the training testimonial following this link:\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"
+"\n"
+"http://%(domain)s%(path)s\n"
+"\n"
+"We remind you that you absolutely need to terminate all steps of your "
+"training before %(date)s.\n"
+"\n"
+"The team of the %(organization)s thank you for your confidence and we remain "
+"at your disposal for further information.\n"
 msgstr ""
-"Félicitations!\n"
+"%(gender)s %(lastname)s,\n"
+"\n"
+"Votre réponse à la consultation n°%(rank)s du séminaire e-learning "
+"\"%(title)s\" a été validée.\n"
+"\n"
+"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"
 "\n"
-"Votre séminaire a été validé.\n"
-"Vous pouvez télecharger votre attestation en cliquant sur ce lien :\n"
+"http://%(domain)s%(path)s\n"
+"\n"
+"Nous vous rappelons que vous devez impérativement achever toutes les étapes "
+"de votre formation avant le %(date)s.\n"
+"\n"
+"L’équipe e-learning de %(organization)s vous remercie de votre confiance et "
+"reste à votre disposition pour renseignement complémentaire.\n"
 
 #: templates/telemeta/base.html:96
 msgid "Desk"
@@ -1556,7 +1644,7 @@ msgstr ""
 "Merci de vous connecter ou bien contactez l'administateur du site pour "
 "obtenir un accès privé."
 
-#: views/pro.py:116
+#: views/pro.py:117
 msgid ""
 "You have successfully terminated your e-learning seminar. A training "
 "testimonial will be available as soon as the pedagogical team validate all "
@@ -1566,7 +1654,7 @@ msgstr ""
 "formation vous sera délivrée dès que vos réponses aux consultations fictives "
 "auront été validées par notre équipe pédagogique (48h maximum)."
 
-#: views/pro.py:118
+#: views/pro.py:119
 msgid ""
 "All your answers have been validated! You can now download the training "
 "testimonial below."
@@ -1574,30 +1662,74 @@ msgstr ""
 "Toutes vos consultations fictives ont été validées ! Vous pouvez désormais "
 "télécharger l'attestation de formation ci-dessous."
 
-#: views/pro.py:160
+#: views/pro.py:163
 msgid "You have successfully saved your answer"
 msgstr "Vous avez enregistré votre consultation avec succès"
 
-#: views/pro.py:162
+#: views/pro.py:165
 msgid "You have successfully submitted your answer"
 msgstr "Vous avez soumis votre consultation avec succès"
 
-#: views/pro.py:265
-msgid "Seminar validated"
-msgstr "Séminaire validé"
+#: views/pro.py:286
+#, fuzzy
+msgid "all your answers has been validated"
+msgstr "Votre consultation a été validée"
 
-#: views/pro.py:271
-msgid "Answer validated"
-msgstr "Consultation validée"
+#: views/pro.py:318 views/pro.py:360
+msgid "Subtitle"
+msgstr "Sous-titre"
 
-#: views/pro.py:295
-msgid "Answer rejected"
-msgstr "Consultation rejetée"
+#: views/pro.py:340
+msgid "validation conditions for an answer"
+msgstr "conditions de validation d'une consultation"
 
-#: views/pro.py:377
+#: views/pro.py:455
 msgid "You have successfully submitted your evaluation"
 msgstr "Vous avez soumis votre évaluation avec succès"
 
+#~ msgid ""
+#~ "Congratulations!\n"
+#~ "\n"
+#~ "Your answer has been validated. \n"
+#~ "You can go to the next step of your seminar following this link:\n"
+#~ msgstr ""
+#~ "Félicitations!\n"
+#~ "\n"
+#~ "Votre dernière consultation a été validée.\n"
+#~ "Vous pouvez accéder à la prochaine étape de votre séminaire en suivant ce "
+#~ "lien :\n"
+
+#~ msgid ""
+#~ "Congratulations!\n"
+#~ "\n"
+#~ "Your seminar has been validated.                \n"
+#~ "You can now download the training testimonial following this link:\n"
+#~ msgstr ""
+#~ "Félicitations!\n"
+#~ "\n"
+#~ "Votre séminaire a été validé.\n"
+#~ "Vous pouvez télecharger votre attestation en cliquant sur ce lien :\n"
+
+#~ msgid "Seminar validated"
+#~ msgstr "Séminaire validé"
+
+#~ msgid "Answer validated"
+#~ msgstr "Consultation validée"
+
+#~ msgid ""
+#~ "Sorry!\n"
+#~ "\n"
+#~ "Your answer has been rejected. \n"
+#~ "You can work and try again following this link:\n"
+#~ msgstr ""
+#~ "Nous sommes désolés!\n"
+#~ "\n"
+#~ "Votre consultation n'a pas été validée.\n"
+#~ "Vous pouvez la re-travailler et la soumettre en suivant ce lien :\n"
+
+#~ msgid "Answer rejected"
+#~ msgstr "Consultation rejetée"
+
 #~ msgid "keywords"
 #~ msgstr "mots clés"
 
@@ -1617,9 +1749,6 @@ msgstr "Vous avez soumis votre évaluation avec succès"
 #~ "Vous pouvez accéder à la prochaine étape de votre séminaire en suivant ce "
 #~ "lien :\n"
 
-#~ msgid "Your answer has been validated"
-#~ msgstr "Votre consultation a été validée"
-
 #~ msgid "Index"
 #~ msgstr "Index"
 
index cdb5643ee49a5cd41b1cca85d58835c6e57b3be3..74b457311a48a053dc4a9caf6f4934ca2dd9951b 100644 (file)
@@ -59,6 +59,13 @@ a:hover {
 
 a img { border: none; }
 
+textarea {
+    padding: 1em;
+    -moz-border-radius: 8px 0px 8px 8px;
+    -webkit-border-radius: 8px 0px 8px 8px;
+    border-radius: 8px 0px 8px 8px;
+    }
+
 .rst-content h1 {
     font-size: 1.2em;
     font-weight: bold;
@@ -1620,7 +1627,15 @@ input,textarea{
 #pm_messages td {
     font-weight: normal;
     font-size: 1em;
+    }
+
 
+#pm_reply textarea {
+    padding: 1em;
+    -moz-border-radius: 8px 0px 8px 8px;
+    -webkit-border-radius: 8px 0px 8px 8px;
+    border-radius: 8px 0px 8px 8px;
+    width: 97%;
     }
 
 #id_body {
index c00027676e2d8c821217af259c431b477c2f3f65..f294ec2384f07c96c4207a89ff1c99886ddfecb4 100644 (file)
@@ -54,7 +54,6 @@
 <form id="_messageReply" action="{% url postman_reply reply_to_pk %}?next={{ next_url|urlencode }}" method="post">{% csrf_token %}
 <div id="pm_reply">{{ form.body }}</div><br />
 <a href="#" class="component_icon button icon_next" onclick="f=document.getElementById('_messageReply'); f.submit(); return false;">{% trans "Reply" %}</a>
-
 {% endif %}
 </div>
 </form>
index b018a220620334241047249800b9b875a9bba160..f908717cd2473b26f039afb461839ee9506c1c1b 100644 (file)
@@ -18,8 +18,7 @@ $('#validate').unbind('click').click(function() {
 $('#reject').unbind('click').click(function() {
  json(['{{answer.id}}'],'teleforma.reject_answer');
  setTimeout(function() {window.location.href = "{% url teleforma-answers %}";}, 1000);
-});
-
+ });
 
 });
 </script>
@@ -43,7 +42,7 @@ $('#reject').unbind('click').click(function() {
 <div class="course_subtitle">
    <h3><img src="{{ STATIC_URL }}telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Answer" %}</h3>
   </div>
-  <div style="text-align: justify; padding: 1em;">
+  <div style="text-align: justify; padding: .5em;">
     {{ answer.answer|safe }}
   </div>
 </div>
index 9026db901b0ded0db626dfdfab7b92757bb8e4a3..c2f90266b7eb80372e4d6202623db082dc640830 100644 (file)
@@ -1,9 +1,12 @@
-{% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}
-{% blocktrans %}Sorry!
+{% load i18n %}{% blocktrans %}{{ gender }} {{ lastname }},
 
-Your answer has been rejected. 
-You can work and try again following this link:
-{% endblocktrans %}                           
-http://{{ site.name }}{{ url }}
+We are sorry we cannot validate your answer n°{{ rank }} of the e-learning seminar "{{ title }}".
 
-{% organization %}
\ No newline at end of file
+This validation is a requisite to allow us to deliver you a testimonial for this training. However, your submitted answer can not be taken into account. We encourage you to complete your answer following this link:
+
+http://{{ domain }}{{ path }}
+
+We remind you that you absolutely need to terminate your training before {{ date }}.
+
+The team of the {{ organization }} thank you for your confidence and we remain at your disposal for further information.
+{% endblocktrans %}
\ No newline at end of file
index 55e24566ae8f5cf70c3f1535743e325dd8989334..5d3315b73476fbfa0b6c40df82717980431296f4 100644 (file)
@@ -1,9 +1,12 @@
-{% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}
-{% blocktrans %}Congratulations!
+{% load i18n %}{% blocktrans %}{{ gender }} {{ lastname }},
 
-Your answer has been validated. 
-You can go to the next step of your seminar following this link:
-{% endblocktrans %}                           
-http://{{ site.name }}{{ url }}
+Your answer to the question n°{{ rank }} of the e-learning seminar "{{ title }}" has been validated.
 
-{% organization %}
\ No newline at end of file
+You can now continue to next step following this link:
+
+http://{{ domain }}{{ path }}
+
+We remind you that you absolutely need to terminate all steps of your training before {{ date }}.
+
+The team of the {{ organization }} thank you for your confidence and we remain at your disposal for further information.
+{% endblocktrans %}
index 3d3e65d282ecec42aec1d9a64b172adbed76414b..bebc94298200912b5cc5829db3e423075737aaee 100644 (file)
@@ -1,9 +1,14 @@
-{% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}
-{% blocktrans %}Congratulations!
+{% load i18n %}{% blocktrans %}{{ gender }} {{ lastname }},
 
-Your seminar has been validated.                
-You can now download the training testimonial following this link:
-{% endblocktrans %}
-http://{{ site.name }}{{ url }}
+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:
 
-{% organization %}
\ No newline at end of file
+http://{{ domain }}{{ path }}
+
+We remind you that you absolutely need to terminate all steps of your training before {{ date }}.
+
+The team of the {{ organization }} thank you for your confidence and we remain at your disposal for further information.
+{% endblocktrans %}
index 3aed0f28274547f20584e8ebcd40bbf257b970f7..fe02c07b058762b0fc71018f62000697093e26a5 100644 (file)
@@ -155,4 +155,6 @@ urlpatterns = patterns('',
 
     url(r'^tinymce/', include('tinymce.urls')),
 
+    url(r'^desk/test/(?P<pk>.*)/$', AnswerDetailViewTest.as_view(), name="test"),
+
 )
index 03442fc383bfe842ea2792415daf12e8dac03c78..61e230f7ff7097d0791169cc5e935744d98f9318 100644 (file)
@@ -258,25 +258,44 @@ class AnswersView(ListView):
 
     @jsonrpc_method('teleforma.validate_answer')
     def validate(request, id):
+        context = {}
         answer = Answer.objects.get(id=id)
         answer.validate()
         user = answer.user
         sender = request.user
         seminar = answer.question.seminar
         site = Site.objects.get_current()
+        path = reverse('teleforma-seminar-detail', kwargs={'pk':seminar.id})
+        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
+        else:
+            context['gender'] = user.first_name
+        context['lastname'] = user.last_name
+        context['rank'] = answer.question.rank
+        context['domain'] = site.name
+        context['path'] = path
+        context['title'] = title
+        context['organization'] = organization
+        context['date'] =  answer.question.seminar.expiry_date
 
         if seminar_validated(user, seminar):
             testimonial = Testimonial(user=user, seminar=seminar)
             testimonial.save()
             url = reverse('teleforma-seminar-testimonial-download', kwargs={'pk':seminar.id}) + '?format=pdf'
-            ctx_dict = {'site': site, 'url': url,}
-            subject = _('Seminar validated') + ' : ' + seminar.title
-            text = render_to_string('teleforma/messages/seminar_validated.txt', ctx_dict)
+            text = render_to_string('teleforma/messages/seminar_validated.txt', context)
+            subject = seminar.title + ' : ' + unicode(_('all your answers has been validated'))
+
         else:
-            url = reverse('teleforma-seminar-detail', kwargs={'pk':seminar.id})
-            ctx_dict = {'site': site, 'url': url,}
-            text = render_to_string('teleforma/messages/answer_validated.txt', ctx_dict)
-            subject = _('Answer validated') + ' : ' + seminar.title
+            text = render_to_string('teleforma/messages/answer_validated.txt', context)
+            subject = seminar.title + ' : ' + unicode(_('answer')) + 'n°' + \
+                        context['rank'] + ' ' + unicode(_('validated')).decode('utf8')
 
         mess = Message(sender=sender, recipient=user, subject=subject, body=text)
         mess.moderation_status = 'a'
@@ -285,10 +304,13 @@ class AnswersView(ListView):
     
     @jsonrpc_method('teleforma.reject_answer')
     def reject(request, id):
+        context = {}
         answer = Answer.objects.get(id=id)
         seminar = answer.question.seminar
         user = answer.user
         sender = request.user
+        site = Site.objects.get_current()
+
         testimonials = Testimonial.objects.filter(user=user, seminar=seminar)
         if testimonials:
             for testimonial in testimonials:
@@ -296,16 +318,69 @@ class AnswersView(ListView):
         answer.validated = False
         answer.status = 2
         answer.save()
-        site = Site.objects.get_current()
-        url = reverse('teleforma-question-answer', kwargs={'pk':answer.question.id})
-        ctx_dict = {'site': site, 'url': url,}
-        text = render_to_string('teleforma/messages/answer_rejected.txt', ctx_dict)
-        subject = _('Answer rejected') + ' : ' + seminar.title
+        
+        path = reverse('teleforma-question-answer', kwargs={'pk':answer.question.id})
+        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
+        else:
+            context['gender'] = user.first_name
+        context['lastname'] = user.last_name
+        context['rank'] = answer.question.rank
+        context['domain'] = site.name
+        context['path'] = path
+        context['title'] = title
+        context['organization'] = organization
+        context['date'] =  answer.question.seminar.expiry_date
+
+        seminar = answer.question.seminar
+        user = answer.user
+        sender = request.user
+        
+        text = render_to_string('teleforma/messages/answer_rejected.txt', context)
+        subject = seminar.title + ' : ' + unicode(_('validation conditions for an answer'))
         mess = Message(sender=sender, recipient=user, subject=subject, body=text)
         mess.moderation_status = 'a'
         mess.save()
         notify_user(mess, 'acceptance')
 
+class AnswerDetailViewTest(DetailView):
+
+    model = Answer
+    template_name='teleforma/messages/answer_rejected.txt'
+
+    def get_context_data(self, **kwargs):
+        context = super(AnswerDetailViewTest, self).get_context_data(**kwargs)
+        answer = self.get_object()
+        seminar = answer.question.seminar
+        user = answer.user
+        sender = self.request.user
+        site = Site.objects.get_current()
+        path= reverse('teleforma-question-answer', kwargs={'pk':answer.question.id})
+        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
+        else:
+            context['gender'] = user.first_name
+        context['lastname'] = user.last_name
+        context['rank'] = answer.question.rank
+        context['domain'] = site.name
+        context['path'] = path
+        context['title'] = title
+        context['organization'] = organization
+        context['date'] =  answer.question.seminar.expiry_date
+        return context
+
 
 class AnswerDetailView(DetailView):