From 7295523af575a5bd7add63c62b8b222c13ad8865 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Fri, 25 Jun 2021 19:08:02 +0200 Subject: [PATCH] add filter for any statusgrund not only wiederholer --- content/student/studentenoverlay.xul.php | 16 ++++++++++++++- rdf/student.rdf.php | 26 ++++++++++++++---------- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/content/student/studentenoverlay.xul.php b/content/student/studentenoverlay.xul.php index 41010e0f5..70bbfcc22 100644 --- a/content/student/studentenoverlay.xul.php +++ b/content/student/studentenoverlay.xul.php @@ -204,7 +204,21 @@ else - + + + getAll(true); + + foreach($statusgrund->result as $row) + { + ?> + + + + db_add_param($studiensemester_kurzbz)." AND - person_id=".$db->db_add_param($row->person_id, FHC_INTEGER)." AND - status_kurzbz='Student' AND statusgrund_id = 14"; - if ( $db->db_query($qry) && ($row_filter = $db->db_fetch_object()) && ($row_filter->anzahl > 0) ) - { - return false; - } + // Alle Studenten mit Statusgrund in tbl_prestudentstatus + $qry = "SELECT count(*) AS anzahl FROM public.tbl_prestudentstatus ps JOIN + public.tbl_prestudent p ON p.prestudent_id = ps.prestudent_id AND + ps. studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)." AND + p. person_id=".$db->db_add_param($row->person_id, FHC_INTEGER)." AND + p.studiengang_kz=" . $db->db_add_param($studiengang_kz, FHC_INTEGER) . " AND + ps.statusgrund_id = " . $db->db_add_param($studstatusgrund[1], FHC_INTEGER); + //echo $qry . "\n"; + $filtered = ( $db->db_query($qry) && ($row_filter = $db->db_fetch_object()) && ($row_filter->anzahl > 0) ) + ? true + : false; + return $filtered; } return true; }