mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-25 07:59:28 +00:00
44ebe15c9c
- Added new permission in fhcomplete.php config file
43 lines
1.3 KiB
PHP
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());
|
|
}
|
|
} |