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
);
+1
View File
@@ -35,6 +35,7 @@ class FiltersLib
const APP_PARAMETER = 'app';
const DATASET_NAME_PARAMETER = 'datasetName';
const FILTER_KURZBZ_PARAMETER = 'filterKurzbz';
const DATASET_RELOAD_PARAMETER = 'reloadDataset';
// ...to specify permissions that are needed to use this FilterWidget
const REQUIRED_PERMISSIONS_PARAMETER = 'requiredPermissions';
@@ -52,7 +52,7 @@ class Kostenstelle_model extends DB_Model
* @param null $geschaeftsjahr
* @return array|null
*/
public function getKostenstellenForGegitschaeftsjahrWithOe($geschaeftsjahr = null)
public function getKostenstellenForGeschaeftsjahrWithOe($geschaeftsjahr = null)
{
$this->load->model('organisation/geschaeftsjahr_model', 'GeschaeftsjahrModel');
@@ -106,6 +106,31 @@ class Kostenstelle_model extends DB_Model
}
}
/**
* Gets all Kostenstellen for which logged in user is berechtigt.
* @param null $berechtigung_kurzbz
* @param null $art
* @return array
*/
public function getKostenstellenBerechtigt($berechtigung_kurzbz = null, $art = null)
{
$allkostenstellen = $this->load();
$kostenstellen = array();
if (hasData($allkostenstellen))
{
foreach ($allkostenstellen->retval as $kostenstelle)
{
if ($this->permissionlib->isBerechtigt($berechtigung_kurzbz, $art, null, $kostenstelle->kostenstelle_id))
{
$kostenstellen[] = $kostenstelle;
}
}
}
return success($kostenstellen);
}
/**
* Gets either given Geschaeftsjahr, current Geschaeftsjahr if not given, or chronologically last Geschaeftsjahr if there is no current
* @param $geschaeftsjahr
+1 -1
View File
@@ -156,7 +156,7 @@ class Notiz_model extends DB_Model
$this->addJoin('public.tbl_notizzuordnung', 'notiz_id');
$this->addOrder('insertamum', 'DESC');
return $this->loadWhere(array('person_id' => $person_id, 'titel' => $titel));
return $this->loadWhere(array('person_id' => $person_id, 'titel LIKE' => $titel));
}
// ------------------------------------------------------------------------------------------------------
@@ -256,6 +256,7 @@
'filter_id' => $this->input->get('filter_id'),
'requiredPermissions' => 'infocenter',
'datasetRepresentation' => 'tablesorter',
'reloadDataset' => ($this->input->get('reloadDataset')=='true'?true:false),
'customMenu' => true,
'checkboxes' => 'PersonId',
'additionalColumns' => array('Details'),
@@ -68,9 +68,13 @@
if (isset($lockedby)):
echo $this->p->t('global', 'wirdBearbeitetVon').': ';
echo $lockedby;
if ($origin_page == 'index'): ?>
if ($origin_page == 'index'):
$unlockpath = 'unlockPerson/'.$stammdaten->person_id;
$unlockpath .= '?fhc_controller_id='.$fhc_controller_id;
$unlockpath .= '&filter_id='.$prev_filter_id;
?>
  
<a href="unlockPerson/<?php echo $stammdaten->person_id; ?>">
<a href="<?php echo $unlockpath; ?>">
<i class="fa fa-sign-out"></i>&nbsp;<?php echo ucfirst($this->p->t('ui', 'freigeben')) ?>
</a>
<?php endif; ?>
@@ -387,19 +387,19 @@
if (isEmptyString($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum))
{
$disabled = $disabledStg = 'disabled';
$disabledTxt = $disabledStgTxt = 'Die Bewerbung muss erst abgeschickt worden sein.';
$disabledTxt = $disabledStgTxt = $this->p->t('infocenter', 'bewerbungMussAbgeschickt');
}
if ($studiengangtyp !== 'b')
{
$disabled = 'disabled';
$disabledTxt = 'Nur Bachelorstudiengänge können freigegeben werden.';
$disabledTxt = $this->p->t('infocenter', 'nurBachelorFreigeben');
// FIT-Lehrgänge: exceptions, can be freigegeben in Infocenter
if (!in_array($studiengang_kz, $fit_programme_studiengaenge))
{
$disabledStg = 'disabled';
$disabledStgTxt = 'Nur Bachelorstudiengänge können freigegeben werden.';
$disabledStgTxt = $this->p->t('infocenter', 'nurBachelorFreigeben');
}
}
?>
+11 -2
View File
@@ -48,6 +48,7 @@ class FilterWidget extends Widget
private $_datasetRepresentation; // dataset representation (ex: tablesorter, pivotUI, ...)
private $_datasetRepresentationOptions; // dataset representation options for tablesorter, pivotUI, ...
private $_reloadDataset; // Force Reload of Dataset
private static $_FilterWidgetInstance; // static property that contains the instance of itself
@@ -156,6 +157,7 @@ class FilterWidget extends Widget
$this->_datasetName = null;
$this->_filterKurzbz = null;
$this->_filterId = null;
$this->_reloadDataset = null;
$this->_query = null;
$this->_additionalColumns = null;
$this->_columnsAliases = null;
@@ -201,6 +203,11 @@ class FilterWidget extends Widget
$this->_query = $args[FiltersLib::QUERY_PARAMETER];
}
if (isset($args[FiltersLib::DATASET_RELOAD_PARAMETER]))
{
$this->_reloadDataset = $args[FiltersLib::DATASET_RELOAD_PARAMETER];
}
// Parameter is used to add extra columns to the dataset
if (isset($args[FiltersLib::ADDITIONAL_COLUMNS])
&& is_array($args[FiltersLib::ADDITIONAL_COLUMNS])
@@ -334,8 +341,10 @@ class FilterWidget extends Widget
else // else if the filter loaded in session is the same that is being requested
{
// Get SESSION_RELOAD_DATASET from the session
$reloadDataset = $this->filterslib->getSessionElement(FiltersLib::SESSION_RELOAD_DATASET);
if ($reloadDataset === true) // if it's value is very true then reload the dataset
$sessionReloadDataset = $this->filterslib->getSessionElement(FiltersLib::SESSION_RELOAD_DATASET);
// if Filter changed or reload is forced by parameter then reload the Dataset
if ($this->_reloadDataset === true || $sessionReloadDataset === true)
{
// Set as false to stop changing the dataset
$this->filterslib->setSessionElement(FiltersLib::SESSION_RELOAD_DATASET, false);