From b3d479eee79d92166052688b08c4b3a2828c1288 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 5 Aug 2015 01:43:14 +0200 Subject: [PATCH] exam: fix different types of quotas --- teleforma/exam/models.py | 4 +++- teleforma/exam/views.py | 2 +- teleforma/locale/en/LC_MESSAGES/django.mo | Bin 13087 -> 13087 bytes teleforma/locale/en/LC_MESSAGES/django.po | 10 +++++----- teleforma/locale/fr/LC_MESSAGES/django.mo | Bin 13459 -> 13431 bytes teleforma/locale/fr/LC_MESSAGES/django.po | 13 ++++++------- 6 files changed, 15 insertions(+), 14 deletions(-) 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 216735be53cf93b1275230a9f5ab4bd00e5e2028..d5806b6a3f87dadd19fab160fa19e93dc7ab9b4b 100644 GIT binary patch delta 20 bcmbQAHa~5Hkutlff`OrxiScGj\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 9107513aff159c9e73f8138054137269ef74502c..7316ea2550c25b7b0a8e42793623d1434524f507 100644 GIT binary patch delta 3183 zcmXZd4NR3)9LMnoxxl@=373}$R1gfrM9_;g#b#LM%+%OiRyxutOw%w?%4qYMx;3q3 z)Rku1o3+qhr`_qWmgUebO6_f?CM6bZ6>6+30~huE@%-J~=bZDLbN>JHKhJ##ue`Qm zf49#qcO2*9D91^_%v{Hb#e9sxV(XV;3jGSq#9208W7eY9ug2lH0poEi`Y?2iuTTqqMs08zmDnGsK>etVV)8tbPysVA5%W+1N>KAFFbQXv z_n_w2Zwtg2z)9*nA{1r9- zDk{#uE)8uI810=f4TsUsMgl2knO9LK9Yn2<%lAw~?VpM~ zcbzPIFd7x0&?byWZ5%QyZTxmr0(YTa$_4hk*2W)3mHIK%JGI%|VdJf+D>{IF;ya(x zP{}$_37p1Zcpf$JM@+-Zs1rpMcnQR#DwK{oVLmEw5vs(KY;SwtIs~C&@sDRE`Z-Zo1z)aM5Hfr8j8!xqf$efD$VpgH%--lUPhpLF{(on!{ zs4w4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H5TgiKd`hJp*;(Dw}@;wSS%Y9;P#H zKy_?8rsx;qD;^YJpC<4}RN&K?hOOpR)GxqY)D;8=^IscAQ3u#;Zb22e16BAgRO=6+ z@*FkKqNj?l^Pox}p*9AF_yLkoA6GWMj1hbu>rfxnNt}qo3jI4?jVgRID&98KNk2th z!EV&IaM;$*6w-g4@H`Wlc+EDn;S-G0i~NGRp*j;q?H`2cIKsxypgJ=db)Xok1ItmJ zS%WI%ZOp=rsCYYy=)V?rGNFLqq5>R6B|3v@*+o?4|6m3t5A_SoMXmQky+0E5-dI!t zQ_NYI#dtm{@d{L@)_6SVh4nVE8M7I0Lsh;Pbp`uTFCIh%K86a|V)GZx8>s#FPzfH` zyeoFDJL6Q;73ZV&c?CSE)kWC;b)yOzhx&hVs`&yc;7b_7*{BoOq6%GwDr_C9qZ?5j zYeXg7W9~!k``*`c$9PcU7SsvPp%Pt01-gz3a2Hk3eboMkw(f@c1*D+%W!gB5O4Jn< zuOI5Y!KgeX7}mf4GMku&+E`)6FvNH<=HMz+K@FIVTT%P>pgMK{)rlWag`PlN(J53X zE}#GAYaPb+ro04;Ds$\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" -- 2.39.5