diff --git a/build/database/repo/ue.php b/build/database/repo/ue.php index 9a98026..641c2c5 100644 --- a/build/database/repo/ue.php +++ b/build/database/repo/ue.php @@ -190,11 +190,27 @@ class ue extends Repo_i { ue.volumeTP, IFNULL(ue.Formation_idFormation, -1) idForm, fdef.labelFormation labelForm, - IFNULL(formlist.formations, '[]') formations + IFNULL(formlist.formations, '[]') formations, + IFNULL(formlist.nbrCours,0) nbrCours, + IFNULL(formlist.nbrTD,0) nbrTD, + IFNULL(formlist.nbrTP,0) nbrTP, + IFNULL(formlist.modCours,0) modCours, + IFNULL(formlist.modTD,0) modTD, + IFNULL(formlist.modTP,0) modTP, + IFNULL(formlist.nbrProfCours,0) nbrProfCours, + IFNULL(formlist.nbrProfTD,0) nbrProfTD, + IFNULL(formlist.nbrProfTP,0) nbrProfTP FROM UE ue LEFT JOIN Formation fdef ON ue.Formation_idFormation = fdef.idFormation LEFT JOIN ( - SELECT ue2.code code, CONCAT('[',GROUP_CONCAT(DISTINCT Formation.idFormation), ']') formations + SELECT ue2.code code, CONCAT('[',GROUP_CONCAT(DISTINCT Formation.idFormation), ']') formations, + count(DISTINCT C.idCours) nbrCours, count(DISTINCT T.idTD) nbrTD, count(DISTINCT T2.idTP) nbrTP, + MOD(sum(DISTINCT C.volume),ue2.volumeCours) modCours, + MOD(sum(DISTINCT T.volume),ue2.volumeTD) modTD, + MOD(sum(DISTINCT T2.volume),ue2.volumeTP) modTP, + count(DISTINCT C.Professeur_idProfesseur) nbrProfCours, + count(DISTINCT T.Professeur_idProfesseur) nbrProfTD, + count(DISTINCT T2.Professeur_idProfesseur) nbrProfTP FROM UE ue2 LEFT JOIN Cours C ON ue2.code = C.UE_code LEFT JOIN TD T ON ue2.code = T.UE_code