]> git.parisson.com Git - teleforma.git/commitdiff
Fix script upload condition
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 4 Jul 2017 22:51:05 +0000 (00:51 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 4 Jul 2017 22:51:05 +0000 (00:51 +0200)
teleforma/exam/views.py

index f2512c73b4885d4ff13aef6850a4ac2a49464c13..7c147f9a496cb04f35e12e6b53a425e54e9d3c31 100644 (file)
@@ -346,7 +346,7 @@ class ScoreCreateView(ScriptCreateView):
         context = super(ScriptCreateView, self).get_context_data(**kwargs)
         period = Period.objects.get(id=self.kwargs['period_id'])
         context['period'] = period
-        if getattr(settings, 'TELEFORMA_EXAM_SCRIPT_UPLOAD', True):
+        if getattr(settings, 'TELEFORMA_EXAM_SCRIPT_UPLOAD', True) and period.date_exam_end:
             context['upload'] = datetime.datetime.now() <= period.date_exam_end
         else:
             context['upload'] = False