mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 01:12:17 +00:00
Merge branch 'feature-25999/C4_cleanup' into merge_FHC4_C4
This commit is contained in:
@@ -23,19 +23,10 @@ class Stundenplan extends Auth_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function index($mode = 'Week', $focus_date = null, $lv_id = null)
|
||||
public function index()
|
||||
{
|
||||
// convert string "null" to actual null values -> ci3 reroute fix
|
||||
$mode = ($mode === 'null') ? 'Week' : ucfirst(strtolower($mode));
|
||||
$focus_date = ($focus_date === 'null') ? date('Y-m-d') : $focus_date;
|
||||
$lv_id = ($lv_id === 'null') ? null : $lv_id;
|
||||
|
||||
if($mode) $mode = ucfirst(strtolower($mode));
|
||||
|
||||
$viewData = array(
|
||||
'mode' => $mode,
|
||||
'focus_date' => $focus_date,
|
||||
'lv_id' => $lv_id,
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
|
||||
@@ -153,6 +153,11 @@ class Stundenplan extends FHCAPI_Controller
|
||||
$stundenplan_data = $this->StundenplanModel->getStundenplanLVA($start_date, $end_date, $lv_id);
|
||||
$stundenplan_data = $this->getDataOrTerminateWithError($stundenplan_data) ?? [];
|
||||
$this->expand_object_information($stundenplan_data);
|
||||
|
||||
// query lv itself in case its Stundenplan is being queried and it has no entries
|
||||
$this->load->model('education/Lehrveranstaltung_model','LehrveranstaltungModel');
|
||||
$lv = getData($this->LehrveranstaltungModel->load($lv_id))[0];
|
||||
$this->addMeta('lv', $lv);
|
||||
$this->terminateWithSuccess($stundenplan_data);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user