mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-07 15:19:31 +00:00
68 lines
1.8 KiB
PHP
68 lines
1.8 KiB
PHP
<?php
|
|
/**
|
|
* Copyright (C) 2024 fhcomplete.org
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
|
class Studiensemester extends FHCAPI_Controller
|
|
{
|
|
|
|
private $_ci;
|
|
|
|
/**
|
|
* Object initialization
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct([
|
|
'getStudiensemester'=> self::PERM_LOGGED,
|
|
|
|
]);
|
|
|
|
$this->_ci =& get_instance();
|
|
|
|
$this->_ci->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
|
|
|
|
|
}
|
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
// Public methods
|
|
|
|
/**
|
|
* GET METHOD
|
|
* returns List of all studiensemester as well as current one
|
|
*/
|
|
public function getStudiensemester()
|
|
{
|
|
$this->_ci->StudiensemesterModel->addOrder("start", "DESC");
|
|
$result = $this->_ci->StudiensemesterModel->load();
|
|
|
|
$studiensemester = getData($result);
|
|
$result = $this->_ci->StudiensemesterModel->getAkt();
|
|
$aktuell = getData($result);
|
|
|
|
$this->terminateWithSuccess(array($studiensemester, $aktuell));
|
|
}
|
|
|
|
//------------------------------------------------------------------------------------------------------------------
|
|
// Private methods
|
|
|
|
|
|
|
|
}
|
|
|