mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-01 19:09:27 +00:00
loadAllStudentUIDSForPersonID also aggregate stg_oes to all student_uids to find assistenzen to notify about happenings of those students; finalized notifyAssistenzAboutMissingEntschuldigungDokumente - for now just skip entschuldigungen from persons with no active student linked anymore;
This commit is contained in:
@@ -425,11 +425,12 @@ class Person_model extends DB_Model
|
||||
$qry = "SELECT
|
||||
CONCAT(tp.vorname, ' ', tp.nachname) AS name,
|
||||
ARRAY_AGG(DISTINCT b.uid ORDER BY b.uid) AS uids,
|
||||
ARRAY_AGG(DISTINCT s.studiengang_kz ORDER BY s.studiengang_kz) AS stg_kzs
|
||||
ARRAY_AGG(DISTINCT CONCAT(stg.typ, stg.kurzbz)) AS stg_oes
|
||||
FROM public.tbl_student s
|
||||
JOIN public.tbl_benutzer b ON s.student_uid = b.uid
|
||||
JOIN public.tbl_person tp ON b.person_id = tp.person_id
|
||||
GROUP BY tp.vorname, tp.nachname, b.aktiv, b.person_id, s.semester, s.studiengang_kz
|
||||
JOIN public.tbl_studiengang stg ON s.studiengang_kz = stg.studiengang_kz
|
||||
GROUP BY tp.vorname, tp.nachname, b.aktiv, b.person_id, s.semester
|
||||
HAVING b.person_id = ? AND b.aktiv IS TRUE AND s.semester > 0;";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, [$person_id]);
|
||||
|
||||
Reference in New Issue
Block a user