From: Guillaume Pellerin Date: Mon, 21 Jul 2014 21:54:21 +0000 (+0200) Subject: test X-Git-Tag: 2.8.1-pro~282^2~57 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=6a98be8ac194c563af7a433a04ebea8c93df8551;p=teleforma.git test --- diff --git a/teleforma/views/pro.py b/teleforma/views/pro.py index 97cc97b0..45a2b744 100644 --- a/teleforma/views/pro.py +++ b/teleforma/views/pro.py @@ -174,12 +174,13 @@ class SeminarView(SeminarAccessMixin, DetailView): messages.info(self.request, _("You have successfully terminated all steps of your e-learning seminar. You can now download your training testimonial below.")) delta = self.get_delta(user, seminar) - context['delta'] = str(delta).split('.')[0] - #TODO if datetime.datetime.now() > REVISION_DATE_FILTER: - context['seminar_time'] = delta - datetime.timedelta(seconds=seminar.duration.as_seconds()) + time = delta - datetime.timedelta(seconds=seminar.duration.as_seconds()) + context['seminar_time'] = time.total_seconds() + context['delta'] = str(delta).split('.')[0] else: context['seminar_time'] = 1 + context['delta'] = '10:37:28' return context @jsonrpc_method('teleforma.publish_seminar')