From faa0ce19ce4ced12c49df9354d578e17ee120768 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 6 Mar 2018 16:07:15 +0100 Subject: [PATCH] Fix progessor SQL (when UE disabled) --- build/database/repo/professor.php | 38 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/build/database/repo/professor.php b/build/database/repo/professor.php index e8bc9fb..5d3a5fb 100644 --- a/build/database/repo/professor.php +++ b/build/database/repo/professor.php @@ -260,25 +260,25 @@ class professor extends Repo_i { Professeur Prof, Categorie Cat, (SELECT IFNULL(SUM(Cours.volume),0) VHCours, Prof.idProfesseur idProf - FROM Professeur Prof - LEFT JOIN Cours ON Prof.idProfesseur = Cours.Professeur_idProfesseur - JOIN UE U ON Cours.UE_code = U.code - WHERE U.disabled = 0 - GROUP BY Prof.idProfesseur) VHCours, - - (SELECT IFNULL(SUM(TD.volume),0) VHTd , Prof.idProfesseur idProf - FROM Professeur Prof - LEFT JOIN TD ON TD.Professeur_idProfesseur = Prof.idProfesseur - JOIN UE U2 ON TD.UE_code = U2.code - WHERE U2.disabled = 0 - GROUP BY Prof.idProfesseur) VHTd, - - (SELECT IFNULL(SUM(TP.volume),0) VHTp, Prof.idProfesseur idProf - FROM Professeur Prof - LEFT JOIN TP ON TP.Professeur_idProfesseur = Prof.idProfesseur - JOIN UE U3 ON TP.UE_code = U3.code - WHERE U3.disabled = 0 - GROUP BY Prof.idProfesseur) VHTp + FROM Professeur Prof + LEFT JOIN Cours ON Prof.idProfesseur = Cours.Professeur_idProfesseur + LEFT JOIN UE U ON Cours.UE_code = U.code + GROUP BY Prof.idProfesseur, U.disabled + HAVING (U.disabled = 0 OR U.disabled IS NULL)) VHCours, + + (SELECT IFNULL(SUM(TD.volume),0) VHTd , Prof.idProfesseur idProf + FROM Professeur Prof + LEFT JOIN TD ON TD.Professeur_idProfesseur = Prof.idProfesseur + LEFT JOIN UE U2 ON TD.UE_code = U2.code + GROUP BY Prof.idProfesseur, U2.disabled + HAVING (U2.disabled = 0 OR U2.disabled IS NULL)) VHTd, + + (SELECT IFNULL(SUM(TP.volume),0) VHTp, Prof.idProfesseur idProf + FROM Professeur Prof + LEFT JOIN TP ON TP.Professeur_idProfesseur = Prof.idProfesseur + LEFT JOIN UE U3 ON TP.UE_code = U3.code + GROUP BY Prof.idProfesseur, U3.disabled + HAVING (U3.disabled = 0 OR U3.disabled IS NULL)) VHTp WHERE $cond Prof.Categorie_idCategorie = Cat.idCategorie AND VHCours.idProf = Prof.idProfesseur