]> git.parisson.com Git - teleforma.git/commitdiff
auto validate answers of the "demo" seminar
authoryomguy <yomguy@parisson.com>
Wed, 20 Mar 2013 09:58:27 +0000 (10:58 +0100)
committeryomguy <yomguy@parisson.com>
Wed, 20 Mar 2013 09:58:27 +0000 (10:58 +0100)
teleforma/views/pro.py

index 5c30ce8081245f41116909c7daccb5f2c5373afd..18ac4110c38309e876266edcc3d64e78b0917c5f 100644 (file)
@@ -185,6 +185,8 @@ class AnswerView(SeminarAccessMixin, FormView):
             messages.info(self.request, _("You have successfully saved your answer."))
         elif answer.status == 3:
             messages.info(self.request, _("You have successfully submitted your answer."))
+            if answer.question.seminar.code == 'demo':
+                answer.validate()
         return super(AnswerView, self).form_valid(form)
 
     def form_invalid(self, form):