From 65f69155121b540c1430021d9925068bb20980e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9o=20Baras?= Date: Mon, 29 Mar 2021 11:29:02 +0200 Subject: [PATCH] Calcul du total des heures --- python/export.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/export.py b/python/export.py index a258725..1a149a2 100644 --- a/python/export.py +++ b/python/export.py @@ -116,11 +116,15 @@ print(f"{nbre_ressources} ressources") # Post traitement des ressources => gestion des heures for r in RESSOURCES: # Nettoie le champ heures_encadrees - print(r.nom) + # print(r.nom) if r.heures_encadrees: r.heures_encadrees = nettoie_heure(r.heures_encadrees) if r.tp: r.tp = nettoie_heure(r.tp) - print(r.heures_encadrees, r.tp) + # print(r.heures_encadrees, r.tp) # Calcul somme des heures +heures_formation_total = sum([r.heures_encadrees for r in RESSOURCES if r.heures_encadrees != None]) +print("Heures de formation totales renseignées :", heures_formation_total) +heures_tp_total = sum([r.tp for r in RESSOURCES if r.tp != None]) +print("Heures de TP renseignées :", heures_tp_total)