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 - +
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; }