]> git.parisson.com Git - teleforma.git/commitdiff
add message when no scores
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 4 Aug 2015 20:53:01 +0000 (22:53 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 4 Aug 2015 20:53:01 +0000 (22:53 +0200)
teleforma/exam/templates/exam/scores.html
teleforma/exam/views.py
teleforma/locale/en/LC_MESSAGES/django.mo
teleforma/locale/en/LC_MESSAGES/django.po
teleforma/locale/fr/LC_MESSAGES/django.mo
teleforma/locale/fr/LC_MESSAGES/django.po

index bb7b17001134c7fae012676d61cfff66969630d4..fd57d13fd468693013b32f0530c21a9e6248faf8 100644 (file)
 </div>
 <br />
 
+{% if messages %}
+    <div class="messages">
+        {% for message in messages %}
+          <div{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</div>
+        {% endfor %}
+    </div>
+{% endif %}
+<br />
+
 {% include_container data.chartcontainer 500 '100%' %}
 
 {% endblock answers %}
index 343d0aa915dbbdb67e69ef3cfd52a620c3308d50..ed872a9a5965f119e9f94db530734640674528d1 100644 (file)
@@ -213,6 +213,9 @@ class ScriptsScoreAllView(ScriptsTreatedView):
     template_name='exam/scores.html'
 
     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."))
+
         chartdata = x
         i = 1
         for data in y:
index bf5e60219219791975ad877ac6c1a57e4c51cbc0..216735be53cf93b1275230a9f5ab4bd00e5e2028 100644 (file)
Binary files a/teleforma/locale/en/LC_MESSAGES/django.mo and b/teleforma/locale/en/LC_MESSAGES/django.mo differ
index c169175641fd98b65d25ff7771e74f4917510d5f..140072081baa03064c9bb775ca7ccb55fb158e15 100644 (file)
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-07-29 10:41+0200\n"
+"POT-Creation-Date: 2015-08-04 22:52+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: Guillaume Pellerin <yomguy@parisson.com>\n"
 "Language-Team: LANGUAGE <lists@parisson.com>\n"
@@ -465,7 +465,11 @@ msgstr ""
 "Il y a une une erreur lors de votre soumission de copie. Merci de vérifier "
 "votre fichier ou de réessayer plus tard."
 
-#: exam/views.py:279
+#: exam/views.py:217
+msgid "You must add one new score at least to access to the statistics."
+msgstr ""
+
+#: exam/views.py:282
 msgid "all courses"
 msgstr "toutes les matières"
 
index 6b1b2cf88aa172de30b90b2c399bd885f0375b9d..9107513aff159c9e73f8138054137269ef74502c 100644 (file)
Binary files a/teleforma/locale/fr/LC_MESSAGES/django.mo and b/teleforma/locale/fr/LC_MESSAGES/django.mo differ
index 515ef143872251682cb627e2324512b74b343ac0..1be26057a3f38d7d1529a230093e6748d5c3a847 100644 (file)
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-07-29 10:41+0200\n"
+"POT-Creation-Date: 2015-08-04 22:52+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: Guillaume Pellerin <yomguy@parisson.com>\n"
 "Language-Team: LANGUAGE <lists@parisson.com>\n"
@@ -467,7 +467,12 @@ msgstr ""
 "Il y a une une erreur lors de votre soumission de copie. Merci de vérifier "
 "votre fichier ou de réessayer plus tard."
 
-#: exam/views.py:279
+#: 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."
+
+#: exam/views.py:282
 msgid "all courses"
 msgstr "toutes les matières"