Files
FHC-Core/application/models/organisation/Studiengang_model.php
T
paolo 030fe2ba74 Merge origin/ci into ci
Conflicts:
	application/core/FHC_Model.php
	application/models/Nation_model.php
	application/models/lehre/Studiengang_model.php
	application/models/lehre/Studienplan_model.php
2016-05-04 15:34:00 +02:00

41 lines
1.2 KiB
PHP

<?php
class Studiengang_model extends DB_Model
{
/**
*
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_studiengang';
$this->pk = 'studiengang_kz';
}
/**
*
*/
public function getAllForBewerbung()
{
$allForBewerbungQuery = "SELECT DISTINCT studiengang_kz,
typ,
organisationseinheittyp_kurzbz,
studiengangbezeichnung,
standort,
studiengangbezeichnung_englisch,
lgartcode,
tbl_lgartcode.bezeichnung
FROM lehre.vw_studienplan LEFT JOIN bis.tbl_lgartcode USING (lgartcode)
WHERE onlinebewerbung IS TRUE
AND aktiv IS TRUE
ORDER BY typ, studiengangbezeichnung, tbl_lgartcode.bezeichnung ASC";
// Checks if the operation is permitted by the API caller
if (! $this->fhc_db_acl->isBerechtigt($this->acl['lehre.vw_studienplan'], 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl['lehre.vw_studienplan'], FHC_MODEL_ERROR);
if (! $this->fhc_db_acl->isBerechtigt($this->acl['bis.tbl_lgartcode'], 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl['lehre.vw_studienplan'], FHC_MODEL_ERROR);
return $this->db->query($allForBewerbungQuery);
}
}