From 848a1b797016d725d7cdc07093931d6b0119fbaf Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 29 Mar 2018 22:24:37 +0200 Subject: [PATCH] [repo.ue] Added some data + number of CM TD TP + modulo of the number of hours of CM TD TP + number of prof assigned to CM TD TP --- build/database/repo/ue.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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