Files
FHC-Core/application/models/studies/Course_model.php
T
paolo 78e4c2900b Merge origin/ci into ci
Conflicts:
	application/config/rest.php
	application/libraries/FHC_Auth.php
	tests/codeception/api/LoginCept.php
2016-04-20 17:57:55 +02:00

43 lines
985 B
PHP

<?php
class Course_model extends DB_Model
{
//
protected $_enabledCoursesQuery = "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";
/**
*
*/
public function __construct()
{
parent::__construct();
}
/**
*
*/
public function getEnabledCourses()
{
$result = NULL;
// Checks if the operation is permitted by the API caller
// All the code should be put inside this if statement
if($this->_checkPermissions())
{
$result = $this->db->query($this->_enabledCoursesQuery);
}
return $result;
}
}