Files
FHC-Core/application/models/organisation/Studiengang_model.php
T
paolo 44ebe15c9c - Method getCheckBewerbung implemented with new standard
- Added new permission in fhcomplete.php config file
2016-05-10 13:05:02 +02:00

43 lines
1.3 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()
{
// 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['bis.tbl_lgartcode'], FHC_MODEL_ERROR);
$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";
$result = $this->db->query($allForBewerbungQuery);
return $this->_success($result->result());
}
}