]> git.parisson.com Git - teleforma.git/commitdiff
fix messsage
authoryomguy <yomguy@parisson.com>
Mon, 18 Feb 2013 16:25:01 +0000 (17:25 +0100)
committeryomguy <yomguy@parisson.com>
Mon, 18 Feb 2013 16:25:01 +0000 (17:25 +0100)
teleforma/templates/postman/email_user.txt
teleforma/views/pro.py

index c2c43b47966b307749735233f1ff38321108f92b..9fb938c22f4b7a8bbcd69ef6e5e93b9977a0c09f 100644 (file)
@@ -1,16 +1,16 @@
 {% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}{% autoescape off %}{% trans "Hello" %} {{ usr.first_name }} {{ usr.last_name }},
 {% if action == 'rejection' %}
-{% blocktrans with object.sent_at|date:"DATETIME_FORMAT" as date and object.obfuscated_recipient as recipient %}On {{ date }}, you asked to send a message to the user '{{ recipient.first_name }} {{ recipient.last_name }}'.{% endblocktrans %}
+{% blocktrans with object.sent_at|date:"DATETIME_FORMAT" as date and object.obfuscated_recipient as recipient %}On {{ date }}, you asked to send a message to {{ recipient.first_name }} {{ recipient.last_name }}.{% endblocktrans %}
 
 {% trans "Your message has been rejected by the moderator" %}{% if object.moderation_reason %}{% trans ", for the following reason:" %}
     {{ object.moderation_reason }}{% else %}.{% endif %}
 
 {% else %}{# 'acceptance' #}
-{% if object.parent_id %}{% if object.parent.sender_id == object.recipient_id %}{% blocktrans with object.parent.sent_at|date:"DATETIME_FORMAT" as date and object.obfuscated_sender as sender %}On {{ date }}, you sent a message to the user '{{ sender.first_name }} {{ sender.last_name }}'.{% endblocktrans %}
+{% if object.parent_id %}{% if object.parent.sender_id == object.recipient_id %}{% blocktrans with object.parent.sent_at|date:"DATETIME_FORMAT" as date and object.obfuscated_sender as sender %}On {{ date }}, you sent a message to {{ sender.first_name }} {{ sender.last_name }}.{% endblocktrans %}
 {% trans "Your correspondent has given you an answer." %}
-{% else %}{% blocktrans with object.obfuscated_sender as sender %}You have received a copy of a response from the user '{{ sender.first_name }} {{ sender.last_name }}'.{% endblocktrans %}
+{% else %}{% blocktrans with object.obfuscated_sender as sender %}You have received a copy of a response from {{ sender.first_name }} {{ sender.last_name }}.{% endblocktrans %}
 {% endif %}
-{% else %}{% blocktrans with object.obfuscated_sender as sender %}You have received a message from the user '{{ sender.first_name }} {{ sender.last_name }}'.{% endblocktrans %}
+{% else %}{% blocktrans with object.obfuscated_sender as sender %}You have received a message from {{ sender.first_name }} {{ sender.last_name }}.{% endblocktrans %}
 {% endif %}{% endif %}{% trans "You can read and respond to this message from your e-learning desk following this link:" %}
 
 http://{{ site.name }}/messages/inbox/
index ceebae46b60c6d3f0733476ef5596ea03c5cac20..23033bb348b801023751204f546bd796c4f5d8cd 100644 (file)
@@ -311,7 +311,7 @@ class AnswersView(ListView):
         if answer.question.seminar.sub_title:
             title = unicode(seminar.sub_title)
         else:
-            title = unicode(seminar.course.title)
+            title = unicode(seminar.title)
 
         auditor = user.auditor.all()
         if auditor:
@@ -368,7 +368,7 @@ class AnswersView(ListView):
         if answer.question.seminar.sub_title:
             title = unicode(seminar.sub_title)
         else:
-            title = unicode(seminar.course.title)
+            title = unicode(seminar.title)
 
         auditor = user.auditor.all()
         if auditor:
@@ -408,7 +408,7 @@ class AnswerDetailViewTest(DetailView):
         user = answer.user
         sender = self.request.user
         site = Site.objects.get_current()
-        path= reverse('teleforma-question-answer', kwargs={'id': seminar.id, 'pk':answer.question.id})
+        path= reverse('teleforma-question-answer', kwargs={'id': seminar.id, 'pk': answer.question.id})
         if answer.question.seminar.sub_title:
             title = unicode(_('Subtitle')) + ' : ' + seminar.sub_title
         else: