[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
This commit is contained in:
Unknown 2018-03-29 22:24:37 +02:00
parent 1997af49f4
commit 848a1b7970
1 changed files with 18 additions and 2 deletions

View File

@ -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