]> git.parisson.com Git - teleforma.git/commitdiff
fix seminar message in other pages
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 30 May 2013 14:31:56 +0000 (16:31 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 30 May 2013 14:31:56 +0000 (16:31 +0200)
teleforma/views/pro.py

index 89df4050b2eb0f43af04d4b7beae5a0a90ef6319..7ae5d065aff806e740f8c0f1635fe58161ffeee6 100644 (file)
@@ -132,11 +132,11 @@ class SeminarView(SeminarAccessMixin, DetailView):
         validated = seminar_validated(user, seminar)
         context['seminar_progress'] = progress
         context['seminar_validated'] = validated
-        if progress == 100 and not validated:
+        if progress == 100 and not validated and self.template_name == 'teleforma/seminar_detail.html':
             messages.info(self.request, _("You have successfully terminated your e-learning seminar. A training testimonial will be available as soon as the pedagogical team validate all your answers (48h maximum)."))
-        elif progress < 100 and validated:
+        elif progress < 100 and validated and self.template_name == 'teleforma/seminar_detail.html':
             messages.info(self.request, _("All your answers have been validated. You can now read the corrected documents (step 5)."))
-        elif progress == 100 and validated:
+        elif progress == 100 and validated and self.template_name == 'teleforma/seminar_detail.html':
             messages.info(self.request, _("You have successfully terminated all steps of your e-learning seminar. You can now download your training testimonial below."))
         set_revision(user, seminar)
         return context