From: Guillaume Pellerin Date: Tue, 4 Aug 2015 23:43:14 +0000 (+0200) Subject: exam: fix different types of quotas X-Git-Tag: 1.1~187 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=b3d479eee79d92166052688b08c4b3a2828c1288;p=teleforma.git exam: fix different types of quotas --- diff --git a/teleforma/exam/models.py b/teleforma/exam/models.py index 2583bb11..dcbb2628 100644 --- a/teleforma/exam/models.py +++ b/teleforma/exam/models.py @@ -282,7 +282,8 @@ class Script(BaseResource): script_type=self.type) if not quotas: quotas = self.course.quotas.filter(date_start__lte=self.date_submitted, - date_end__gte=self.date_submitted) + date_end__gte=self.date_submitted, + script_type=None) if quotas: for quota in quotas: if quota.value: @@ -290,6 +291,7 @@ class Script(BaseResource): lower_quota = sorted(quota_list, key=lambda k: k['level'])[0] self.corrector = lower_quota['obj'].corrector else: + #FIXME: default corrector goes to settings self.corrector = User.objects.filter(is_superuser=True)[1] self.status = 3 diff --git a/teleforma/exam/views.py b/teleforma/exam/views.py index ed872a9a..a41b96b6 100644 --- a/teleforma/exam/views.py +++ b/teleforma/exam/views.py @@ -214,7 +214,7 @@ class ScriptsScoreAllView(ScriptsTreatedView): def score_data_setup(self, x, y): if not x['x']: - messages.warning(self.request, _("You must add one new score at least to access to the statistics.")) + messages.warning(self.request, _("You must add your score to access to the statistics.")) chartdata = x i = 1 diff --git a/teleforma/locale/en/LC_MESSAGES/django.mo b/teleforma/locale/en/LC_MESSAGES/django.mo index 216735be..d5806b6a 100644 Binary files a/teleforma/locale/en/LC_MESSAGES/django.mo and b/teleforma/locale/en/LC_MESSAGES/django.mo differ diff --git a/teleforma/locale/en/LC_MESSAGES/django.po b/teleforma/locale/en/LC_MESSAGES/django.po index 14007208..0d77a947 100644 --- a/teleforma/locale/en/LC_MESSAGES/django.po +++ b/teleforma/locale/en/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-04 22:52+0200\n" +"POT-Creation-Date: 2015-08-05 01:43+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Guillaume Pellerin \n" "Language-Team: LANGUAGE \n" @@ -23,7 +23,7 @@ msgstr "" msgid "period" msgstr "période" -#: exam/models.py:62 exam/models.py:436 +#: exam/models.py:62 exam/models.py:438 msgid "rejected" msgstr "rejetée" @@ -39,7 +39,7 @@ msgstr "soumise" msgid "pending" msgstr "en attente" -#: exam/models.py:63 exam/models.py:421 +#: exam/models.py:63 exam/models.py:423 msgid "marked" msgstr "corrigée" @@ -251,7 +251,7 @@ msgstr "" msgid "Session" msgstr "Séance" -#: exam/models.py:258 exam/models.py:420 exam/models.py:435 +#: exam/models.py:258 exam/models.py:422 exam/models.py:437 msgid "Script" msgstr "Copie" @@ -466,7 +466,7 @@ msgstr "" "votre fichier ou de réessayer plus tard." #: exam/views.py:217 -msgid "You must add one new score at least to access to the statistics." +msgid "You must add your score to access to the statistics." msgstr "" #: exam/views.py:282 diff --git a/teleforma/locale/fr/LC_MESSAGES/django.mo b/teleforma/locale/fr/LC_MESSAGES/django.mo index 9107513a..7316ea25 100644 Binary files a/teleforma/locale/fr/LC_MESSAGES/django.mo and b/teleforma/locale/fr/LC_MESSAGES/django.mo differ diff --git a/teleforma/locale/fr/LC_MESSAGES/django.po b/teleforma/locale/fr/LC_MESSAGES/django.po index 1be26057..c943a4c2 100644 --- a/teleforma/locale/fr/LC_MESSAGES/django.po +++ b/teleforma/locale/fr/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-04 22:52+0200\n" +"POT-Creation-Date: 2015-08-05 01:43+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Guillaume Pellerin \n" "Language-Team: LANGUAGE \n" @@ -23,7 +23,7 @@ msgstr "" msgid "period" msgstr "période" -#: exam/models.py:62 exam/models.py:436 +#: exam/models.py:62 exam/models.py:438 msgid "rejected" msgstr "rejetée" @@ -39,7 +39,7 @@ msgstr "soumise" msgid "pending" msgstr "en attente" -#: exam/models.py:63 exam/models.py:421 +#: exam/models.py:63 exam/models.py:423 msgid "marked" msgstr "corrigée" @@ -251,7 +251,7 @@ msgstr "" msgid "Session" msgstr "Séance" -#: exam/models.py:258 exam/models.py:420 exam/models.py:435 +#: exam/models.py:258 exam/models.py:422 exam/models.py:437 msgid "Script" msgstr "Copie" @@ -468,9 +468,8 @@ msgstr "" "votre fichier ou de réessayer plus tard." #: exam/views.py:217 -msgid "You must add one new score at least to access to the statistics." -msgstr "" -"Vous devez ajouter au moins une nouvelle note pour accéder aux statistiques." +msgid "You must add your score to access to the statistics." +msgstr "Vous devez ajouter votre note pour accéder aux statistiques." #: exam/views.py:282 msgid "all courses"