Merge branch 'master' into ciauth

This commit is contained in:
Paolo
2019-04-17 15:46:27 +02:00
35 changed files with 1935 additions and 374 deletions
@@ -207,6 +207,7 @@ class InfoCenter extends Auth_Controller
$data[self::FHC_CONTROLLER_ID] = $this->getControllerId();
$data[self::ORIGIN_PAGE] = $origin_page;
$data[self::PREV_FILTER_ID] = $this->input->get(self::PREV_FILTER_ID);
$this->load->view('system/infocenter/infocenterDetails.php', $data);
}
@@ -222,7 +223,18 @@ class InfoCenter extends Auth_Controller
if (isError($result))
show_error($result->retval);
redirect('/'.self::INFOCENTER_URI.'?'.self::FHC_CONTROLLER_ID.'='.$this->getControllerId());
$redirectLink = '/'.self::INFOCENTER_URI.'?'.self::FHC_CONTROLLER_ID.'='.$this->getControllerId();
// Force reload of Dataset after Unlock
$redirectLink .= '&reloadDataset=true';
$currentFilterId = $this->input->get(self::FILTER_ID);
if (isset($currentFilterId))
{
$redirectLink .= '&'.self::FILTER_ID.'='.$currentFilterId;
}
redirect($redirectLink);
}
/**
@@ -234,7 +246,7 @@ class InfoCenter extends Auth_Controller
$akte_id = $this->input->post('akte_id');
$formalgeprueft = $this->input->post('formal_geprueft');
$json = false;
$json = null;
if (isset($akte_id) && isset($formalgeprueft) && isset($person_id))
{
@@ -247,7 +259,7 @@ class InfoCenter extends Auth_Controller
if (isSuccess($result))
{
$json = $timestamp;
$json = is_null($timestamp) ? '' : $timestamp;
$this->_log(
$person_id,
@@ -261,7 +273,7 @@ class InfoCenter extends Auth_Controller
}
}
$this->output->set_content_type('application/json')->set_output(json_encode($json));
$this->outputJsonSuccess(array($json));
}
/**
@@ -272,7 +284,7 @@ class InfoCenter extends Auth_Controller
{
$prestudentdata = $this->_loadPrestudentData($person_id);
$this->output->set_content_type('application/json')->set_output(json_encode($prestudentdata['zgvpruefungen']));
$this->outputJsonSuccess($prestudentdata['zgvpruefungen']);
}
/**
@@ -283,7 +295,7 @@ class InfoCenter extends Auth_Controller
{
$prestudent = $this->PrestudentModel->getLastPrestudent($person_id, true);
$this->output->set_content_type('application/json')->set_output(json_encode($prestudent));
$this->outputJson($prestudent);
}
/**
@@ -299,10 +311,10 @@ class InfoCenter extends Auth_Controller
$studiengangbezeichnung = $prestudentdata['studiengang_bezeichnung'];
$data = array(
'studiengang_bezeichnung' => $studiengangbezeichnung,
'studiengang_kurzbz' => $studiengangkurzbz,
'data' => null
);
'studiengang_bezeichnung' => $studiengangbezeichnung,
'studiengang_kurzbz' => $studiengangkurzbz,
'data' => null
);
if (hasData($studienordnung))
{
@@ -319,13 +331,14 @@ class InfoCenter extends Auth_Controller
{
$prestudent_id = $this->input->post('prestudentid');
$change = $this->input->post('change');
$json = false;
if (!is_numeric($change) || !is_numeric($prestudent_id))
$result = error('Parameteres missing');
else
$result = $this->PrestudentModel->changePrio($prestudent_id, intval($change));
if (is_numeric($change) || is_numeric($prestudent_id))
{
$json = $this->PrestudentModel->changePrio($prestudent_id, intval($change));
}
$this->output->set_content_type('application/json')->set_output(json_encode($result));
$this->outputJsonSuccess(array($json));
}
/**
@@ -403,7 +416,8 @@ class InfoCenter extends Auth_Controller
$this->_log($logdata['person_id'], 'savezgv', array($logdata['studiengang_kurzbz'], $prestudent_id));
}
}
$this->output->set_content_type('application/json')->set_output(json_encode($json));
$this->outputJson($json);
}
/**
@@ -454,7 +468,8 @@ class InfoCenter extends Auth_Controller
}
}
}
$this->output->set_content_type('application/json')->set_output(json_encode($json));
$this->outputJson($json);
}
/**
@@ -521,9 +536,7 @@ class InfoCenter extends Auth_Controller
// acceptresult returns null if no documents to accept
if ($acceptresult !== null && isError($acceptresult))
{
$json->error = 2;
}
$json->retval['nonCriticalErrors'] = 'error when accepting documents in FAS';
$logparams = array($prestudent_id, $logdata['studiengang_kurzbz'], '');
@@ -543,7 +556,7 @@ class InfoCenter extends Auth_Controller
}
}
$this->output->set_content_type('application/json')->set_output(json_encode($json));
$this->outputJson($json);
}
/**
@@ -557,7 +570,7 @@ class InfoCenter extends Auth_Controller
$notiz_id
);
$this->output->set_content_type('application/json')->set_output(json_encode($result));
$this->outputJson($result);
}
/**
@@ -577,7 +590,7 @@ class InfoCenter extends Auth_Controller
$this->_log($person_id, 'savenotiz', array($titel));
}
$this->output->set_content_type('application/json')->set_output(json_encode($result));
$this->outputJson($result);
}
/**
@@ -608,7 +621,7 @@ class InfoCenter extends Auth_Controller
$this->_log($person_id, 'updatenotiz', array($titel));
}
$this->output->set_content_type('application/json')->set_output(json_encode($result));
$this->outputJson($result);
}
/**
@@ -696,9 +709,9 @@ class InfoCenter extends Auth_Controller
*/
public function getParkedDate($person_id)
{
$result = $this->personloglib->getParkedDate($person_id);
$parkedDate = $this->personloglib->getParkedDate($person_id);
$this->output->set_content_type('application/json')->set_output(json_encode($result));
$this->outputJsonSuccess(array($parkedDate));
}
/**
@@ -711,7 +724,7 @@ class InfoCenter extends Auth_Controller
$result = $this->personloglib->park($person_id, date_format(date_create($date), 'Y-m-d'), self::TAETIGKEIT, self::APP, null, $this->_uid);
$this->output->set_content_type('application/json')->set_output(json_encode($result));
$this->outputJson($result);
}
/**
@@ -722,14 +735,8 @@ class InfoCenter extends Auth_Controller
$person_id = $this->input->post('person_id');
$result = $this->personloglib->unPark($person_id);
if (isError($result))
{
$this->outputJsonError($result);
}
else
{
$this->output->set_content_type('application/json')->set_output(json_encode(getData($result)));
}
$this->outputJson($result);
}
/**
@@ -741,14 +748,14 @@ class InfoCenter extends Auth_Controller
$result = $this->StudienjahrModel->getCurrStudienjahr();
$json = false;
$json = null;
if (hasData($result))
{
$json = $result->retval[0]->ende;
}
$this->output->set_content_type('application/json')->set_output(json_encode($json));
$this->outputJsonSuccess(array($json));
}
/**
@@ -1158,7 +1165,7 @@ class InfoCenter extends Auth_Controller
show_error($notizen->retval);
}
$notizen_bewerbung = $this->NotizModel->getNotizByTitel($person_id, 'Anmerkung zur Bewerbung');
$notizen_bewerbung = $this->NotizModel->getNotizByTitel($person_id, 'Anmerkung zur Bewerbung%');
if (isError($notizen_bewerbung))
{
@@ -1254,7 +1261,6 @@ class InfoCenter extends Auth_Controller
$data = array (
'zgvpruefungen' => $zgvpruefungen,
'numberinteressenten' => $interessentenCount,
'abwstatusgruende' => $abwstatusgruende,
'intstatusgruende' => $intstatusgruende
);