From 0dbce2ad0b1647ca7f2bb8f37d6559d6567f3464 Mon Sep 17 00:00:00 2001 From: yomguy Date: Wed, 2 Jan 2013 16:36:51 +0100 Subject: [PATCH] fix seminar description --- teleforma/context_processors.py | 12 ++ teleforma/locale/fr/LC_MESSAGES/django.mo | Bin 11557 -> 12029 bytes teleforma/locale/fr/LC_MESSAGES/django.po | 165 ++++++++++-------- teleforma/static/teleforma/css/teleforma.css | 2 + .../templates/teleforma/answer_form.html | 75 ++++++++ .../teleforma/inc/seminar_description.html | 14 ++ .../templates/teleforma/seminar_detail.html | 12 +- teleforma/templates/teleforma/seminars.html | 10 +- teleforma/templatetags/teleforma_tags.py | 5 + teleforma/views/pro.py | 4 +- 10 files changed, 207 insertions(+), 92 deletions(-) create mode 100644 teleforma/templates/teleforma/inc/seminar_description.html diff --git a/teleforma/context_processors.py b/teleforma/context_processors.py index b844a4d6..b534b260 100644 --- a/teleforma/context_processors.py +++ b/teleforma/context_processors.py @@ -75,6 +75,18 @@ def seminar_validated(user, seminar): return not False in validated return False +def seminar_terminated(user, seminar): + validated = [] + questions = seminar.question.all() + if questions: + for question in questions: + answers = Answer.objects.filter(question=question, user=user) + if answers: + validated.append(True) + else: + validated.append(False) + return not False in validated + return False def all_seminars(request, progress_order=False): seminars = [] diff --git a/teleforma/locale/fr/LC_MESSAGES/django.mo b/teleforma/locale/fr/LC_MESSAGES/django.mo index 4b835cb842e57a3544159e7b5b9ad56dacea2302..745bc6bf7136467bc76c8a02e23c1aec51637092 100644 GIT binary patch literal 12029 zcmbW637lP3ea8iy@0BB z8C1Kkhw68?&wsbie?L@zcfo_;y-@9Z3ab4Fq3VAfYU+wHRc`k*T$LUb* z^h2%BdZ_g}-^a&&eh&91{Sv5lF7x?UL6zSP)y^$Y{oU^4cl-QLz-N;FMaa^d@B8$B zhnmm4BiuZn3D*%n0%|-VRC`UReoN2GpvHfd&wne_`rZU}E@q&{^8xq__z|de`8-rR z-}U)VK&|i3p!)eYsQvgaAK(AkuH6Mt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;jq2cI)Ii5j_n$&d;45pdM-6xdb^Q&i-?sCy zS?s_5@0XCpf2;5q(eW$t3^_{PAcM$!(wp2lj!@WO6@A$(BcGC;4TZwRN|U&)t5&vqlx@g%v2=(GJS`GV;9g-__G*@~f+tGtLD zB%{frB%7pZfEw~HxpQ=&P(kh|b>w}b<9FooP|3NMaXZ;&^}A7z@=bDv%peO$Eh!-P zk#VFm(HENzecbhX6MCzqTeUu+sW%~1VM{=`>)xHH1s7pT9Dt9{;F_1M!JzXWIFjZ(ea6o zdkFiHpOf|EEuv$sj~kErMObR}RoI8Tu1B6jp`NTEGs(T=6`~{PPF5a; zPgyww?;?d(AA(h6H5oykBNxde5=+jLT)h!GW|L_0XL6W)MY4#FO+K!~{0r_U>13X@ z4K{n3J+Kk^BWX>_Nio?=V#ok;mUt`qQ${`{v&a~dLQ=`!$Z?|M0Uwu-KOs}eFl+0A zPgr?3E+KiOIcZP!kUPgA3M)u=zrk}uDJ&+>`wjp1_h(jXi&MyH5+HNQ2jn%fkHnLQ z$#T++==ibEfB#le+C~0A-X?J*^u`?s6`cDMR+GtAe*`aBdAM1MTgf_dE?C|)J1RIZ usasfZR`UJfft)@$-Gd*dOpXknK5^ diff --git a/teleforma/locale/fr/LC_MESSAGES/django.po b/teleforma/locale/fr/LC_MESSAGES/django.po index 5e2bb4e1..28bb012d 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: 2013-01-02 15:50+0100\n" +"POT-Creation-Date: 2013-01-02 16:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Guillaume Pellerin \n" "Language-Team: LANGUAGE \n" @@ -63,8 +63,7 @@ msgstr "nom" #: models/core.py:91 models/core.py:103 models/core.py:126 models/core.py:138 #: models/core.py:153 models/core.py:204 models/core.py:312 models/core.py:378 #: models/core.py:398 models/crfpa.py:48 models/pro.py:147 models/pro.py:193 -#: templates/teleforma/seminar_detail.html:71 -#: templates/teleforma/seminars.html:113 +#: templates/teleforma/inc/seminar_description.html:11 msgid "description" msgstr "description" @@ -126,7 +125,7 @@ msgid "types" msgstr "types" #: models/core.py:175 models/core.py:222 models/core.py:414 models/core.py:474 -#: models/pro.py:87 templates/teleforma/seminar_detail.html:65 +#: models/pro.py:87 templates/teleforma/inc/seminar_description.html:5 msgid "course" msgstr "matière" @@ -345,13 +344,11 @@ msgstr "" msgid "Seminar type" msgstr "Type de séminaire" -#: models/pro.py:89 templates/teleforma/seminar_detail.html:67 -#: templates/teleforma/seminars.html:109 +#: models/pro.py:89 templates/teleforma/inc/seminar_description.html:7 msgid "public concerned" msgstr "public concerné" -#: models/pro.py:90 templates/teleforma/seminar_detail.html:66 -#: templates/teleforma/seminars.html:108 +#: models/pro.py:90 templates/teleforma/inc/seminar_description.html:6 msgid "level" msgstr "niveau" @@ -388,7 +385,7 @@ msgid "form" msgstr "formulaire" #: models/pro.py:137 templates/teleforma/answer_form.html:77 -#: templates/teleforma/seminar_detail.html:180 +#: templates/teleforma/seminar_detail.html:170 #: templates/teleforma/seminar_media_audio.html:56 #: templates/teleforma/seminar_media_video.html:104 #: templates/teleforma/testimonials.html:64 @@ -452,7 +449,7 @@ msgid "Testimonial template" msgstr "Modèle d'attestation" #: models/pro.py:219 templates/teleforma/inc/testimonial_list.html:14 -#: views/pro.py:482 +#: views/pro.py:484 msgid "Testimonial" msgstr "Attestation" @@ -770,17 +767,71 @@ msgid "Submit it" msgstr "Soumettre" #: templates/teleforma/answer_form.html:70 -#: templates/teleforma/seminar_detail.html:174 -#: templates/teleforma/seminars.html:128 +#: templates/teleforma/seminar_detail.html:164 +#: templates/teleforma/seminars.html:120 msgid "Progressions" msgstr "Progressions" #: templates/teleforma/answer_form.html:74 -#: templates/teleforma/seminar_detail.html:177 -#: templates/teleforma/seminars.html:131 +#: templates/teleforma/seminar_detail.html:167 +#: templates/teleforma/seminars.html:123 msgid "General" msgstr "Général" +#: templates/teleforma/answer_form.html:94 +msgid "Steps" +msgstr "" + +#: templates/teleforma/answer_form.html:99 +#: templates/teleforma/seminar_detail.html:78 +msgid "Step 1 : read these documents" +msgstr "Étape 1 : lire ces documents" + +#: templates/teleforma/answer_form.html:103 +#: templates/teleforma/seminar_detail.html:82 +msgid "Step 1 : read this document" +msgstr "Étape 1 : lire ce document" + +#: templates/teleforma/answer_form.html:111 +#: templates/teleforma/seminar_detail.html:90 +msgid "Step 2 : view these conferences" +msgstr "Étape 2 : visionner ces conférences" + +#: templates/teleforma/answer_form.html:115 +#: templates/teleforma/seminar_detail.html:94 +msgid "Step 2 : view this conference" +msgstr "Étape 2 : visionner cette conférence" + +#: templates/teleforma/answer_form.html:123 +#: templates/teleforma/seminar_detail.html:102 +msgid "Step 3 : read these documents" +msgstr "Étape 3 : lire ces documents" + +#: templates/teleforma/answer_form.html:127 +#: templates/teleforma/seminar_detail.html:106 +msgid "Step 3 : read this document" +msgstr "Étape 3 : lire ce document" + +#: templates/teleforma/answer_form.html:135 +#: templates/teleforma/seminar_detail.html:114 +msgid "Step 4 : answer to these questions" +msgstr "Étape 4 : réaliser ces consultations fictives" + +#: templates/teleforma/answer_form.html:141 +#: templates/teleforma/seminar_detail.html:120 +msgid "Step 4 : answer to this question" +msgstr "Étape 4 : réaliser cette consultation fictive" + +#: templates/teleforma/answer_form.html:151 +#: templates/teleforma/seminar_detail.html:130 +msgid "Step 5 : read these corrected documents" +msgstr "Étape 5 : lire ces documents corrigés" + +#: templates/teleforma/answer_form.html:155 +#: templates/teleforma/seminar_detail.html:134 +msgid "Step 5 : read this corrected document" +msgstr "Étape 5 : lire ce document corrigé" + #: templates/teleforma/answers.html:6 templates/teleforma/answers.html:62 #: templates/telemeta/base.html:112 msgid "Answers" @@ -1005,12 +1056,12 @@ msgstr "Mes notes" msgid "New note" msgstr "Nouvelle note" -#: templates/teleforma/courses.html:104 templates/teleforma/seminars.html:143 +#: templates/teleforma/courses.html:104 templates/teleforma/seminars.html:135 msgid "Status" msgstr "Status" #: templates/teleforma/evaluation_form.html:10 -#: templates/teleforma/seminar_detail.html:151 +#: templates/teleforma/seminar_detail.html:141 msgid "Step 6 : evaluate the seminar" msgstr "Étape 6 : évaluer ce séminaire" @@ -1023,62 +1074,11 @@ msgstr "Aide" msgid "Informations" msgstr "Informations" -#: templates/teleforma/seminar_detail.html:68 -#: templates/teleforma/seminars.html:110 -msgid "duration" -msgstr "durée" - -#: templates/teleforma/seminar_detail.html:69 -#: templates/teleforma/seminar_testimonial.html:42 -#: templates/teleforma/seminars.html:111 -msgid "keywords" -msgstr "mots clés" - -#: templates/teleforma/seminar_detail.html:88 -msgid "Step 1 : read these documents" -msgstr "Étape 1 : lire ces documents" - -#: templates/teleforma/seminar_detail.html:92 -msgid "Step 1 : read this document" -msgstr "Étape 1 : lire ce document" - -#: templates/teleforma/seminar_detail.html:100 -msgid "Step 2 : view these conferences" -msgstr "Étape 2 : voir ces conférences" - -#: templates/teleforma/seminar_detail.html:104 -msgid "Step 2 : view this conference" -msgstr "Étape 2 : voir cette conférence" - -#: templates/teleforma/seminar_detail.html:112 -msgid "Step 3 : read these documents" -msgstr "Étape 3 : lire ces documents" - -#: templates/teleforma/seminar_detail.html:116 -msgid "Step 3 : read this document" -msgstr "Étape 3 : lire ce document" - -#: templates/teleforma/seminar_detail.html:124 -msgid "Step 4 : answer to these questions" -msgstr "Étape 4 : réaliser ces consultations fictives" - -#: templates/teleforma/seminar_detail.html:130 -msgid "Step 4 : answer to this question" -msgstr "Étape 4 : réaliser cette consultation fictive" - -#: templates/teleforma/seminar_detail.html:140 -msgid "Step 5 : read these corrected documents" -msgstr "Étape 5 : lire ces documents corrigés" - -#: templates/teleforma/seminar_detail.html:144 -msgid "Step 5 : read this corrected document" -msgstr "Étape 5 : lire ce document corrigé" - -#: templates/teleforma/seminar_detail.html:158 +#: templates/teleforma/seminar_detail.html:148 msgid "Step 7 : download your testimonial" msgstr "" -#: templates/teleforma/seminar_detail.html:192 +#: templates/teleforma/seminar_detail.html:182 msgid "Index" msgstr "Index" @@ -1117,6 +1117,11 @@ msgstr "" msgid "Training type" msgstr "Type de formation" +#: templates/teleforma/seminar_testimonial.html:42 +#: templates/teleforma/inc/seminar_description.html:9 +msgid "keywords" +msgstr "mots clés" + #: templates/teleforma/seminar_testimonial.html:46 msgid "Training begin date" msgstr "Date de début de formation" @@ -1220,6 +1225,14 @@ msgstr "enregistrée le" msgid "Validated" msgstr "validé" +#: templates/teleforma/inc/seminar_description.html:8 +msgid "duration" +msgstr "durée" + +#: templates/teleforma/inc/seminar_description.html:8 +msgid "hours" +msgstr "heures" + #: templates/telemeta/base.html:96 msgid "Desk" msgstr "Bureau" @@ -1476,14 +1489,24 @@ msgstr "" "obtenir un accès privé." #: views/pro.py:154 +msgid "" +"You have successfully terminated your e-learning seminar. A training " +"testimonial will be available as soon as the pedagogical team validate all " +"your answers (48h maximum)." +msgstr "" +"Vous avez achevé avec succès votre séminaire e-learning. Une attestation de " +"formation vous sera délivrée dès que vos réponses aux consultations fictives " +"auront été validées par notre équipe pédagogique (48h maximum)." + +#: views/pro.py:156 msgid "You have successfully saved your answer" msgstr "Vous avez enregistré votre reponse avec succès" -#: views/pro.py:156 +#: views/pro.py:158 msgid "You have successfully submitted your answer" msgstr "Vous avez soumis votre reponse avec succès" -#: views/pro.py:354 +#: views/pro.py:356 msgid "You have successfully sumitted your evaluation" msgstr "Vous avez soumis votre évaluation avec succès" diff --git a/teleforma/static/teleforma/css/teleforma.css b/teleforma/static/teleforma/css/teleforma.css index 7b096b86..d0e320b6 100644 --- a/teleforma/static/teleforma/css/teleforma.css +++ b/teleforma/static/teleforma/css/teleforma.css @@ -1831,6 +1831,8 @@ form .exceed{ border-radius: 8px 0px 8px 8px; color: black; padding: 0.5em; + max-height: 300px; + overflow-y: auto; } diff --git a/teleforma/templates/teleforma/answer_form.html b/teleforma/templates/teleforma/answer_form.html index 479c69b8..89f955d1 100644 --- a/teleforma/templates/teleforma/answer_form.html +++ b/teleforma/templates/teleforma/answer_form.html @@ -88,3 +88,78 @@ $(document).ready(function(){ {% endblock progress %} + +{% block index %} +
+

status {% trans "Steps" %}

+
+ + {% with seminar.docs_1 as docs %} + {% if docs.all.count > 1 %} + {% with _("Step 1 : read these documents") as title %} + {% include "teleforma/inc/document_simple_list.html" %} + {% endwith %} + {% else %} + {% with _("Step 1 : read this document") as title %} + {% include "teleforma/inc/document_simple_list.html" %} + {% endwith %} + {% endif %} + {% endwith %} + + {% with seminar.media as media_packages %} + {% if media_packages.all.count > 1 %} + {% with _("Step 2 : view these conferences") as title %} + {% include "teleforma/inc/media_package_list.html" %} + {% endwith %} + {% else %} + {% with _("Step 2 : view this conference") as title %} + {% include "teleforma/inc/media_package_list.html" %} + {% endwith %} + {% endif %} + {% endwith %} + + {% with seminar.docs_2 as docs %} + {% if docs.all.count > 1 %} + {% with _("Step 3 : read these documents") as title %} + {% include "teleforma/inc/document_simple_list.html" %} + {% endwith %} + {% else %} + {% with _("Step 3 : read this document") as title %} + {% include "teleforma/inc/document_simple_list.html" %} + {% endwith %} + {% endif %} + {% endwith %} + + {% with seminar.question as questions %} + {% if questions.all.count > 1 %} + {% with _("Step 4 : answer to these questions") as title %} + {% include "teleforma/inc/question_list.html" %} + {% endwith %} + {% else %} + + + {% with _("Step 4 : answer to this question") as title %} + {% include "teleforma/inc/question_list.html" %} + {% endwith %} + {% endif %} + {% endwith %} + + + {% if seminar_progress == 100 %} + {% with seminar.docs_correct as docs %} + {% if docs.all.count > 1 %} + {% with _("Step 5 : read these corrected documents") as title %} + {% include "teleforma/inc/document_simple_list.html" %} + {% endwith %} + {% else %} + {% with _("Step 5 : read this corrected document") as title %} + {% include "teleforma/inc/document_simple_list.html" %} + {% endwith %} + {% endif %} + {% endwith %} + {% endif %} + + +
+
+{% endblock index %} diff --git a/teleforma/templates/teleforma/inc/seminar_description.html b/teleforma/templates/teleforma/inc/seminar_description.html new file mode 100644 index 00000000..8c47cfae --- /dev/null +++ b/teleforma/templates/teleforma/inc/seminar_description.html @@ -0,0 +1,14 @@ +{% load teleforma_tags %} +{% load i18n %} + +
+
{% trans "course" %}
{{ seminar.course }}
+
{% trans "level" %}
{{ seminar.level }}
+
{% trans "public concerned" %}
{{ seminar.concerned }}
+
{% trans "duration" %}
{{ seminar.duration|hours }} {% trans "hours" %}
+{% if seminar.keywords.all %}
{% trans "keywords" %}
{% for kw in seminar.keywords.all %}{{ kw }}{% if not forloop.last %},{% endif %} {% endfor %}
{% endif %} + +
\ No newline at end of file diff --git a/teleforma/templates/teleforma/seminar_detail.html b/teleforma/templates/teleforma/seminar_detail.html index 4a4cc6cb..fc569827 100644 --- a/teleforma/templates/teleforma/seminar_detail.html +++ b/teleforma/templates/teleforma/seminar_detail.html @@ -61,17 +61,7 @@ $(function () {

{% trans "Informations" %}

-
-
{% trans "course" %}
{{ seminar.course }}
-
{% trans "level" %}
{{ seminar.level }}
-
{% trans "public concerned" %}
{{ seminar.concerned }}
-
{% trans "duration" %}
{{ seminar.duration }}
- {% if seminar.keywords.all %}
{% trans "keywords" %}
{% for kw in seminar.keywords.all %}{{ kw }}, {% endfor %}
{% endif %} - -
+ {% include "teleforma/inc/seminar_description.html" %}
{% if messages %}
diff --git a/teleforma/templates/teleforma/seminars.html b/teleforma/templates/teleforma/seminars.html index 68f7ecaa..70b6eae8 100644 --- a/teleforma/templates/teleforma/seminars.html +++ b/teleforma/templates/teleforma/seminars.html @@ -104,15 +104,7 @@ $(function() {
-
-
{% trans "level" %}
{{ seminar.level }}
-
{% trans "public concerned" %}
{{ seminar.concerned }}
-
{% trans "duration" %}
{{ seminar.duration }}
- {% if seminar.keywords.all %}
{% trans "keywords" %}
{% for kw in seminar.keywords.all %}{{ kw }}, {% endfor %}
{% endif %} - {% if seminar.description %} -
{% trans "description" %}
{{ seminar.description|safe }}
- {% endif %} -
+ {% include "teleforma/inc/seminar_description.html" %}
diff --git a/teleforma/templatetags/teleforma_tags.py b/teleforma/templatetags/teleforma_tags.py index 3019bd4c..fb9d7eb3 100644 --- a/teleforma/templatetags/teleforma_tags.py +++ b/teleforma/templatetags/teleforma_tags.py @@ -272,3 +272,8 @@ def free_first(qs): @register.simple_tag def admin_username(): return settings.ADMIN_USERNAME + +@register.filter +def hours(time): + return str(int(str(time).split(':')[0])) + diff --git a/teleforma/views/pro.py b/teleforma/views/pro.py index b41b028b..3805cddc 100644 --- a/teleforma/views/pro.py +++ b/teleforma/views/pro.py @@ -150,7 +150,9 @@ class AnswerView(FormView): answer.user = self.request.user answer.question = self.question answer.save() - if answer.status <= 2: + if seminar_terminated(self.request.user, answer.question.seminar): + messages.info(self.request, _("You have successfully terminated your e-learning seminar. A training testimonial will be available as soon as the pedagogical team validate all your answers (48h maximum).")) + elif answer.status <= 2: messages.info(self.request, _("You have successfully saved your answer")) elif answer.status == 3: messages.info(self.request, _("You have successfully submitted your answer")) -- 2.39.5