mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 00:24:35 +00:00
test api endpoint to include the lvinfo menu link
This commit is contained in:
@@ -1122,4 +1122,43 @@ class lehreinheit extends basis_db
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
public function lehreinheitInfo($lvid,$angezeigtes_stsem,$lehrfach_id)
|
||||
{
|
||||
$qry = "SELECT * FROM (SELECT distinct on(uid) vorname, nachname, tbl_benutzer.uid as uid,
|
||||
CASE WHEN lehrfunktion_kurzbz='LV-Leitung' THEN true ELSE false END as lvleiter
|
||||
FROM lehre.tbl_lehreinheit, lehre.tbl_lehreinheitmitarbeiter, public.tbl_benutzer, public.tbl_person
|
||||
WHERE
|
||||
tbl_lehreinheit.lehreinheit_id=tbl_lehreinheitmitarbeiter.lehreinheit_id AND
|
||||
tbl_lehreinheitmitarbeiter.mitarbeiter_uid=tbl_benutzer.uid AND
|
||||
tbl_person.person_id=tbl_benutzer.person_id AND
|
||||
lehrveranstaltung_id=".$this->db_add_param($lvid, FHC_INTEGER)." AND
|
||||
tbl_lehreinheitmitarbeiter.mitarbeiter_uid NOT like '_Dummy%' AND
|
||||
tbl_benutzer.aktiv=true AND tbl_person.aktiv=true AND
|
||||
studiensemester_kurzbz=".$this->db_add_param($angezeigtes_stsem);
|
||||
|
||||
if($lehrfach_id!='')
|
||||
$qry.=" AND tbl_lehreinheit.lehrfach_id=".$this->db_add_param($lehrfach_id);
|
||||
|
||||
$qry.=" ORDER BY uid, lvleiter desc) as a ORDER BY lvleiter desc, nachname, vorname";
|
||||
|
||||
$result = $this->db_query($qry);
|
||||
if (!$result)
|
||||
{
|
||||
$this->errormsg=$this->db_last_error().$qry;
|
||||
return false;
|
||||
}
|
||||
$ret = array();
|
||||
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$ret[] = $row;
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user