From: Guillaume Pellerin Date: Sat, 1 Jul 2017 10:14:47 +0000 (+0200) Subject: No scroll in the page center, fix script period X-Git-Tag: 1.1~15^2~10 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=283a6dc2137aa3a1fa105ef34d173f7a2a48ba59;p=teleforma.git No scroll in the page center, fix script period --- diff --git a/teleforma/exam/views.py b/teleforma/exam/views.py index e02430b3..f863d0f4 100644 --- a/teleforma/exam/views.py +++ b/teleforma/exam/views.py @@ -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)] diff --git a/teleforma/static/teleforma/css/teleforma.css b/teleforma/static/teleforma/css/teleforma.css index cdceea7e..90ba5285 100644 --- a/teleforma/static/teleforma/css/teleforma.css +++ b/teleforma/static/teleforma/css/teleforma.css @@ -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; } diff --git a/teleforma/templates/registration/activation_complete.html b/teleforma/templates/registration/activation_complete.html index 2082f775..63f343bf 100644 --- a/teleforma/templates/registration/activation_complete.html +++ b/teleforma/templates/registration/activation_complete.html @@ -7,5 +7,3 @@ Thanks, activation complete! You may now login using the username and password you set at registration. {% endblocktrans %} {% endblock %} - - diff --git a/teleforma/templates/registration/activation_email.txt b/teleforma/templates/registration/activation_email.txt index c29561fa..d54ccb34 100644 --- a/teleforma/templates/registration/activation_email.txt +++ b/teleforma/templates/registration/activation_email.txt @@ -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 %}