diff --git a/application/config/fhcomplete.php b/application/config/fhcomplete.php index 9e56b1a88..b0af59794 100644 --- a/application/config/fhcomplete.php +++ b/application/config/fhcomplete.php @@ -24,6 +24,8 @@ $config['fhc_acl'] = array 'public.tbl_prestudent' => 'basis/person', 'public.tbl_prestudentstatus' => 'basis/person', 'public.tbl_organisationseinheit' => 'basis/organisationseinheit', + 'public.tbl_studiengang' => 'basis/studiengang', + 'public.tbl_sprache' => 'admin', 'public.tbl_msg_thread' => 'admin', 'public.tbl_msg_message' => 'admin' diff --git a/application/controllers/api/v1/organisation/Studiengang2.php b/application/controllers/api/v1/organisation/Studiengang2.php index 237a85f11..0a05e020a 100644 --- a/application/controllers/api/v1/organisation/Studiengang2.php +++ b/application/controllers/api/v1/organisation/Studiengang2.php @@ -27,6 +27,22 @@ class Studiengang2 extends APIv1_Controller $this->StudiengangModel->setUID($this->_getUID()); } + public function getStudiengang() + { + $studiengang_kz = $this->get('studiengang_kz'); + + if(isset($studiengang_kz)) + { + $result = $this->StudiengangModel->load($studiengang_kz); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + public function getAllForBewerbung() { $this->response($this->StudiengangModel->getAllForBewerbung(), REST_Controller::HTTP_OK); diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index 777c9b26c..5cf38c121 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -224,6 +224,16 @@ class DB_Model extends FHC_Model return $this->_success(TRUE); } + /** --------------------------------------------------------------- + * Add distinct clause + * + * @return void + */ + public function addDistinct() + { + $this->db->distinct(); + } + /** --------------------------------------------------------------- * Add limit clause *