]> git.parisson.com Git - teleforma.git/commitdiff
No scroll in the page center, fix script period
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Sat, 1 Jul 2017 10:14:47 +0000 (12:14 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Sat, 1 Jul 2017 10:14:47 +0000 (12:14 +0200)
teleforma/exam/views.py
teleforma/static/teleforma/css/teleforma.css
teleforma/templates/registration/activation_complete.html
teleforma/templates/registration/activation_email.txt

index e02430b3c2890e1b73f69c852aef31179c899d65..f863d0f47bb741b6ba98150995ca34d8aee8380d 100644 (file)
@@ -159,8 +159,9 @@ class ScriptCreateView(CreateView):
         return reverse_lazy('teleforma-exam-scripts-pending', kwargs={'period_id':period.id})
 
     def form_valid(self, form):
+        period = Period.objects.get(id=self.kwargs['period_id'])
         scripts = Script.objects.filter(course=form.cleaned_data['course'], session=form.cleaned_data['session'],
-                                        type=form.cleaned_data['type'], author=self.request.user).exclude(status=0)
+                                        type=form.cleaned_data['type'], author=self.request.user, period=period).exclude(status=0)
         if scripts:
             messages.error(self.request, _("Error: you have already submitted a script for this session, the same course and the same type!"))
             return redirect('teleforma-exam-script-create', self.kwargs['period_id'])
@@ -343,7 +344,7 @@ class ScoreCreateView(ScriptCreateView):
 
     def get_context_data(self, **kwargs):
         context = super(ScriptCreateView, self).get_context_data(**kwargs)
-        context['upload'] = getattr(settings, 'TELEFORMA_EXAM_SCRIPT_UPLOAD', True) 
+        context['upload'] = getattr(settings, 'TELEFORMA_EXAM_SCRIPT_UPLOAD', True)
         context['period'] = Period.objects.get(id=self.kwargs['period_id'])
         context['create_fields'] = ['course', 'session', 'type', 'score' ]
         course_pk_list = [c['course'].id for c in get_courses(self.request.user)]
index cdceea7ea358f3a719d34a538d98cd3ae0478dfb..90ba5285c74967bb376c91c47ee46bca4a7e7dfe 100644 (file)
@@ -1430,7 +1430,7 @@ input,textarea{
     float: left;
     width: 50%;
     padding: 0em 3em 0em 2em;
-    max-height: 550px;
+    /*max-height: 550px;*/
     overflow-y: auto;
     }
 
@@ -1460,7 +1460,7 @@ input,textarea{
     }
 
 #large_scroll {
-    max-height: 750px;
+    /*max-height: 750px;*/
     overflow-y: auto;
     padding: 0em 1em 0em 0em;
     }
index 2082f77563c569afe894392f53020e19e85fa26f..63f343bfa7274b9ab13cdd92e0d6c8f6d2baafa7 100644 (file)
@@ -7,5 +7,3 @@
 Thanks, activation complete!  You may now <a href='{{ auth_login_url }}'>login</a> using the username and password you set at registration.
 {% endblocktrans %}
 {% endblock %}
-
-
index c29561faf69fdeb2a752cd645b0e44f43d743f97..d54ccb34678e6f1b6f8d552c58c410768019186d 100644 (file)
@@ -5,11 +5,11 @@ You (or someone pretending to be you) have asked to register an account at
 {{ sitename }}.  If this wasn't you, please ignore this email
 and your address will be removed from our records.
 
-To activate this account, please click the following link within the next 
+To activate this account, please click the following link within the next
 {{ expiration_days }} days:
 
 http://{{ siteurl }}{{ activation_key_url }}
 
 Sincerely,
 {{ sitename }} Management
-{% endblocktrans %}
\ No newline at end of file
+{% endblocktrans %}