mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 16:32:20 +00:00
Implementation CIS => RoomInformation
This commit is contained in:
@@ -130,30 +130,69 @@ class StundenplanLib{
|
||||
|
||||
}
|
||||
|
||||
public function getReservierungen($start_date, $end_date, $ort_kurzbz){
|
||||
/**
|
||||
* Get stundenplan for a room
|
||||
*
|
||||
* @param string $ort_kurzbz
|
||||
* @param string $start_date
|
||||
* @param string $end_date
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getRoomplan($ort_kurzbz, $start_date, $end_date)
|
||||
{
|
||||
$this->_ci =& get_instance();
|
||||
|
||||
// Load Config
|
||||
$this->_ci->load->config('calendar');
|
||||
// Load Models
|
||||
$this->_ci->load->model('ressource/Stundenplan_model', 'StundenplanModel');
|
||||
|
||||
$query = $this->_ci->StundenplanModel->getRoomQuery($ort_kurzbz, $start_date, $end_date);
|
||||
$roomplan_data = $this->_ci->StundenplanModel->stundenplanGruppierung($query);
|
||||
|
||||
if (isError($roomplan_data))
|
||||
return $roomplan_data;
|
||||
|
||||
$this->expand_object_information($roomplan_data->retval);
|
||||
|
||||
return $roomplan_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get reservations (for a room or all)
|
||||
*
|
||||
* @param string $start_date
|
||||
* @param string $end_date
|
||||
* @param string $ort_kurzbz
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getReservierungen($start_date, $end_date, $ort_kurzbz = '')
|
||||
{
|
||||
$this->_ci =& get_instance();
|
||||
|
||||
// Load Config
|
||||
$this->_ci->load->config('calendar');
|
||||
// Load Models
|
||||
$this->_ci->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
|
||||
$is_mitarbeiter = getData($this->_ci->MitarbeiterModel->isMitarbeiter(getAuthUID()));
|
||||
if($is_mitarbeiter)
|
||||
{
|
||||
|
||||
if ($is_mitarbeiter) {
|
||||
$reservierungen = $this->_ci->ReservierungModel->getReservierungenMitarbeiter($start_date, $end_date, $ort_kurzbz);
|
||||
} else {
|
||||
// querying the reservierungen
|
||||
$reservierungen = $this->_ci->ReservierungModel->getReservierungen($start_date, $end_date, $ort_kurzbz);
|
||||
}
|
||||
if(isError($reservierungen))
|
||||
{
|
||||
return error(getData($reservierungen));
|
||||
}
|
||||
$reservierungen = getData($reservierungen) ?? [];
|
||||
$function_error = $this->expand_object_information($reservierungen);
|
||||
if(!is_null($function_error)){
|
||||
|
||||
if (isError($reservierungen))
|
||||
return $reservierungen;
|
||||
|
||||
$function_error = $this->expand_object_information($reservierungen->retval);
|
||||
|
||||
if (!is_null($function_error))
|
||||
return $function_error;
|
||||
}
|
||||
return success($reservierungen);
|
||||
|
||||
return $reservierungen;
|
||||
}
|
||||
|
||||
public function getLektorenFromLehrveranstaltung($lehrveranstaltung_id, $semester, $studiengang_kz, $studiensemester_kurzbz){
|
||||
|
||||
Reference in New Issue
Block a user