Erweiterungen zum Abruf der Standorte für Bewerbertool

This commit is contained in:
Nikolaus Krondraf
2015-05-13 12:07:58 +02:00
parent 124f03cbbc
commit 059a37fb5f
2 changed files with 34 additions and 1 deletions
+33
View File
@@ -691,5 +691,38 @@ class organisationseinheit extends basis_db
return false;
}
}
/**
* Gibt alle Standorte zurück
* @param $aktiv
* @param $lehre
* @return boolean|array false im Fehlerfall, ansonsten ein Array
*/
public function getAllStandorte($aktiv=null, $lehre=null)
{
$result = array();
$qry = "SELECT DISTINCT standort FROM public.tbl_organisationseinheit WHERE standort IS NOT NULL";
if(!is_null($aktiv))
$qry.=" AND aktiv=".$this->db_add_param($aktiv, FHC_BOOLEAN);
if(!is_null($lehre))
$qry.=" AND lehre=".$this->db_add_param($lehre, FHC_BOOLEAN);
if($this->db_query($qry))
{
while($row = $this->db_fetch_object())
{
$result[] = $row->standort;
}
return $result;
}
else
{
$this->errormsg = 'Fehler beim Laden der Standorte';
return false;
}
}
}
?>
+1 -1
View File
@@ -237,7 +237,7 @@ class studiengang extends basis_db
*/
public function getAllForBewerbung()
{
$qry = 'SELECT DISTINCT studiengang_kz, typ, organisationseinheittyp_kurzbz, studiengangbezeichnung '
$qry = 'SELECT DISTINCT studiengang_kz, typ, organisationseinheittyp_kurzbz, studiengangbezeichnung, standort '
. 'FROM lehre.vw_studienplan '
. 'WHERE onlinebewerbung IS TRUE '
. 'ORDER BY studiengangbezeichnung ASC';