diff --git a/CHANGELOG.md b/CHANGELOG.md index 05c155569..f3c5c7b30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - **[FAS]** Mitarbeiterexport exportiert jetzt nur noch die markierten Personen - **[CORE]** Has many as possible javascripts and css present in the repository were removed. Their lack is overcome by the packages in the composer. In the meanwhile also the versions were updated - **[CIS]** Die Fotoliste wird jetzt mit unoconv erstellt. Die bestehende Vorlage für den Dokumentenexport muss hier angepasst werden +- **[CORE]** Resturlaubstage und Mehrarbeitsstunden wurden aus dem Core entfernt und können nicht mehr mit FH-Complete verwaltet werden. ### Updateinfo - **[CORE]** Infoscreen wurde umbenannt (informationsbildschirm.php) diff --git a/application/config/fhcomplete.php b/application/config/fhcomplete.php index 786937dd7..29c93e2e4 100644 --- a/application/config/fhcomplete.php +++ b/application/config/fhcomplete.php @@ -59,7 +59,6 @@ $config['fhc_acl'] = array 'campus.tbl_pruefungsstatus' => 'basis/pruefungsstatus', 'campus.tbl_pruefungstermin' => 'basis/pruefungstermin', 'campus.tbl_reservierung' => 'basis/reservierung', - 'campus.tbl_resturlaub' => 'basis/resturlaub', 'campus.tbl_studentbeispiel' => 'basis/studentbeispiel', 'campus.tbl_studentuebung' => 'basis/studentuebung', 'campus.tbl_template' => 'basis/template', diff --git a/application/config/roles.php b/application/config/roles.php index 2851de48f..6c2d0614b 100644 --- a/application/config/roles.php +++ b/application/config/roles.php @@ -55,7 +55,7 @@ $config['roles'] = array ( 'basis/adresse','basis/akte','basis/kontakt','basis/log','basis/nation','basis/notiz','basis/notizzuordnung', 'basis/person','basis/prestudent','basis/prestudentstatus','basis/status','basis/zgv','basis/zgvmaster', - 'lehre/studienplan','system/filters' + 'lehre/studienplan','system/filters','fs/dms' ) ) ); diff --git a/application/controllers/api/v1/ressource/Resturlaub.php b/application/controllers/api/v1/ressource/Resturlaub.php deleted file mode 100644 index 98cfe0979..000000000 --- a/application/controllers/api/v1/ressource/Resturlaub.php +++ /dev/null @@ -1,78 +0,0 @@ -load->model('ressource/resturlaub_model', 'ResturlaubModel'); - - - } - - /** - * @return void - */ - public function getResturlaub() - { - $resturlaubID = $this->get('resturlaub_id'); - - if (isset($resturlaubID)) - { - $result = $this->ResturlaubModel->load($resturlaubID); - - $this->response($result, REST_Controller::HTTP_OK); - } - else - { - $this->response(); - } - } - - /** - * @return void - */ - public function postResturlaub() - { - if ($this->_validate($this->post())) - { - if (isset($this->post()['resturlaub_id'])) - { - $result = $this->ResturlaubModel->update($this->post()['resturlaub_id'], $this->post()); - } - else - { - $result = $this->ResturlaubModel->insert($this->post()); - } - - $this->response($result, REST_Controller::HTTP_OK); - } - else - { - $this->response(); - } - } - - private function _validate($resturlaub = NULL) - { - return true; - } -} \ No newline at end of file diff --git a/application/controllers/system/infocenter/InfocenterDetails.php b/application/controllers/system/infocenter/InfocenterDetails.php index 8c0c231a9..acb72efc5 100644 --- a/application/controllers/system/infocenter/InfocenterDetails.php +++ b/application/controllers/system/infocenter/InfocenterDetails.php @@ -9,8 +9,16 @@ if (! defined("BASEPATH")) exit("No direct script access allowed"); */ class InfocenterDetails extends VileSci_Controller { - //app name for logging + //app and Verarbeitungstaetigkeit name for logging const APP = 'aufnahme'; + const TAETIGKEIT = 'bewerbung'; + const LOGPARAMS = array( + 'saveformalgep' => array('logtype' => 'Action', 'name' => 'document formally checked', 'message' => 'document %s formally checked, set to %s'), + 'savezgv' => array('logtype' => 'Action', 'name' => 'ZGV saved', 'message' => 'ZGV saved for degree program %s, prestudentid %s'), + 'abgewiesen' => array('logtype' => 'Processstate', 'name' => 'Interessent rejected', 'message' => 'Interessent with prestudentid %s was rejected for degree program %s'), + 'freigegeben' => array('logtype' => 'Processstate', 'name' => 'Interessent confirmed', 'message' => 'status Interessent for prestudentid %s was confirmed for degree program %s'), + 'savenotiz' => array('logtype' => 'Action', 'name' => 'note added', 'message' => 'note with title %s was added') + ); /** * constructor @@ -55,15 +63,6 @@ class InfocenterDetails extends VileSci_Controller if(!isset($stammdaten->retval)) return null; -/* $dokumente = $this->AkteModel->loadWhere(array('person_id' => $person_id)); - - if ($dokumente->error) - { - show_error($dokumente->retval); - } - - var_dump($dokumente->retval);*/ - $dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false); if ($dokumente->error) @@ -78,9 +77,7 @@ class InfocenterDetails extends VileSci_Controller show_error($dokumente->retval); } - //var_dump($dokumente->retval);die(); - - $logs = $this->personloglib->getLogs($person_id, $this::APP); + $logs = $this->personloglib->getLogs($person_id); $notizen = $this->NotizModel->getNotiz($person_id); @@ -107,7 +104,7 @@ class InfocenterDetails extends VileSci_Controller */ private function __loadPrestudentData($person_id) { - $zgvpruefungen = []; + $zgvpruefungen = array(); $prestudenten = $this->PrestudentModel->loadWhere(array('person_id' => $person_id)); @@ -140,7 +137,7 @@ class InfocenterDetails extends VileSci_Controller return 0; elseif($a->prestudentstatus->status_kurzbz === 'Interessent' && $b->prestudentstatus->status_kurzbz === 'Interessent') { - //infoonly Interessenten are behind new Interessenten + //infoonly Interessenten come after new Interessenten if($a->infoonly) return 1; elseif($b->infoonly) @@ -207,8 +204,8 @@ class InfocenterDetails extends VileSci_Controller } //write person log - $this->personloglib->log($person_id, 'Action', array('name' => 'Dokument formal geprüft', 'message' => 'Dokument '.$akte->titel.' formal geprüft, gesetzt auf '.(is_null($timestamp) ? 'NULL' : $timestamp), 'success' => 'true'), $this::APP, null, $this->uid); - //redirect to start page + $this->__log($person_id, 'saveformalgep', array(empty($akte->retval[0]->titel) ? $akte->retval[0]->bezeichnung : $akte->retval[0]->titel, is_null($timestamp) ? 'NULL' : $timestamp)); + redirect('/system/infocenter/InfocenterDetails/showDetails/'.$person_id.'#DokPruef'); } @@ -243,7 +240,7 @@ class InfocenterDetails extends VileSci_Controller //get extended Prestudent data for logging $logdata = $this->__getPersonAndStudiengangFromPrestudent($prestudent_id); - $this->personloglib->log($logdata['person_id'], 'Action', array('name' => 'Zgv gespeichert', 'message' => 'Zgv für Studiengang '.$logdata['studiengang_kurzbz'].' wurde gespeichert', 'success' => 'true'), $this::APP, null, $this->uid); + $this->__log($logdata['person_id'], 'savezgv', array($logdata['studiengang_kurzbz'], $prestudent_id)); $this->__redirectToStart($prestudent_id, 'ZgvPruef'); } @@ -274,7 +271,7 @@ class InfocenterDetails extends VileSci_Controller $logdata = $this->__getPersonAndStudiengangFromPrestudent($prestudent_id); - $this->personloglib->log($logdata['person_id'], 'Processstate', array('name' => 'Interessent abgewiesen', 'message' => 'Interessent wurde für Studiengang '.$logdata['studiengang_kurzbz'].' abgewiesen', 'success' => 'true'), $this::APP, null, $this->uid); + $this->__log($logdata['person_id'], 'abgewiesen', array($prestudent_id, $logdata['studiengang_kurzbz'])); $this->__redirectToStart($prestudent_id, 'ZgvPruef'); } @@ -303,7 +300,7 @@ class InfocenterDetails extends VileSci_Controller $logdata = $this->__getPersonAndStudiengangFromPrestudent($prestudent_id); - $this->personloglib->log($logdata['person_id'], 'Processstate', array('name' => 'Interessent freigegeben', 'message' => 'Interessent wurde für Studiengang '.$logdata['studiengang_kurzbz'].' freigegeben', 'success' => 'true'), $this::APP, null, $this->uid); + $this->__log($logdata['person_id'], 'freigegeben', array($prestudent_id, $logdata['studiengang_kurzbz'])); $this->__redirectToStart($prestudent_id, 'ZgvPruef'); } @@ -325,7 +322,7 @@ class InfocenterDetails extends VileSci_Controller show_error($result->retval); } - $this->personloglib->log($person_id, 'Action', array('name' => 'Notiz hinzugefügt', 'message' => 'Notiz mit Titel '.$titel.' wurde hinzugefügt', 'success' => 'true'), $this::APP, null, $this->uid); + $this->__log($person_id, 'savenotiz', array($titel)); redirect('/system/infocenter/InfocenterDetails/showDetails/'.$person_id.'#NotizAkt'); } @@ -390,4 +387,18 @@ class InfocenterDetails extends VileSci_Controller return array('person_id' => $person_id, 'studiengang_kurzbz' => $studiengang_kurzbz); } + /** + * helper function for logging + * @param $person_id + * @param $logname + * @param $messageparams + */ + private function __log($person_id, $logname, $messageparams) + { + $logparams = $this::LOGPARAMS[$logname]; + $this->personloglib->log($person_id, $logparams['logtype'], + array('name' => $logparams['name'], 'message' => vsprintf($logparams['message'], $messageparams), 'success' => 'true'), + $this::TAETIGKEIT, $this::APP, null, $this->uid); + } + } \ No newline at end of file diff --git a/application/libraries/PersonLogLib.php b/application/libraries/PersonLogLib.php index 6b63ba472..cf713825d 100644 --- a/application/libraries/PersonLogLib.php +++ b/application/libraries/PersonLogLib.php @@ -21,16 +21,18 @@ class PersonLogLib * @param int $person_id ID of the Person. * @param string $logtype_kurzbz Type of Log. * @param array $logdata Array of the JSON Data to save. + * @param string $taetigkeit_kurzbz * @param string $app Application that log belongs to. * @param string $oe_kurzbz Organisation Unit the Log belongs to. * @param string $user User who created the log. - * @return boolean true if success + * @return bool true if success */ - public function log($person_id, $logtype_kurzbz, $logdata, $app = 'core', $oe_kurzbz = null, $user = null) + public function log($person_id, $logtype_kurzbz, $logdata, $taetigkeit_kurzbz, $app = 'core', $oe_kurzbz = null, $user = null) { $data = array( 'person_id' => $person_id, 'zeitpunkt' => date('Y-m-d H:i:s'), + 'taetigkeit_kurzbz' => $taetigkeit_kurzbz, 'app' => $app, 'oe_kurzbz' => $oe_kurzbz, 'logtype_kurzbz' => $logtype_kurzbz, @@ -49,13 +51,14 @@ class PersonLogLib * Gets Logs for a Person, filtered by parameters. * Requirements for retrieving log: name is set * @param int $person_id ID of the Person. + * @param string $taetigkeit_kurzbz Verarbeitungstätigkeit * @param string $app Name of the App. - * @param string $oe_kurzbz Organisations Unit. - * @return object $result + * @param string $oe_kurzbz Organisation Unit. + * @return array */ - public function getLogs($person_id, $app = null, $oe_kurzbz = null) + public function getLogs($person_id, $taetigkeit_kurzbz = null, $app = null, $oe_kurzbz = null) { - $result = $this->ci->PersonLogModel->filterLog($person_id, $app, $oe_kurzbz); + $result = $this->ci->PersonLogModel->filterLog($person_id, $taetigkeit_kurzbz, $app, $oe_kurzbz); if (isSuccess($result)) { diff --git a/application/models/ressource/Resturlaub_model.php b/application/models/ressource/Resturlaub_model.php deleted file mode 100644 index a2f6fdf54..000000000 --- a/application/models/ressource/Resturlaub_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_resturlaub'; - $this->pk = 'mitarbeiter_uid'; - } -} diff --git a/application/models/system/PersonLog_model.php b/application/models/system/PersonLog_model.php index 4725815f3..02f52008c 100644 --- a/application/models/system/PersonLog_model.php +++ b/application/models/system/PersonLog_model.php @@ -35,11 +35,12 @@ class PersonLog_model extends CI_Model /** * Loads the last Log Entry of a Person * @param int $person_id ID of the Person. + * @param string $taetigkeit_kurzbz Verarbeitungstätigkeit * @param string $app Name of the App. * @param string $oe_kurzbz Organisations Unit. * @return object $result */ - public function getLastLog($person_id, $app = null, $oe_kurzbz = null) + public function getLastLog($person_id, $taetigkeit_kurzbz = null, $app = null, $oe_kurzbz = null) { // Check Permissions $this->load->library('PermissionLib'); @@ -49,6 +50,8 @@ class PersonLog_model extends CI_Model $this->db->order_by('zeitpunkt', 'DESC'); $this->db->order_by('log_id', 'DESC'); $this->db->limit(1); + if (!is_null($taetigkeit_kurzbz)) + $this->db->where('taetigkeit_kurzbz='.$this->db->escape($oe_kurzbz)); if (!is_null($app)) $this->db->where('app='.$this->db->escape($app)); if (!is_null($oe_kurzbz)) @@ -62,11 +65,12 @@ class PersonLog_model extends CI_Model /** * Load logs for a person, filtered by parameters * @param int $person_id ID of the Person. + * @param string $taetigkeit_kurzbz Verarbeitungstätigkeit * @param string $app Name of the App. * @param string $oe_kurzbz Organisations Unit. * @return object $result */ - public function filterLog($person_id, $app = null, $oe_kurzbz = null) + public function filterLog($person_id, $taetigkeit_kurzbz = null, $app = null, $oe_kurzbz = null) { // Check Permissions $this->load->library('PermissionLib'); @@ -75,6 +79,8 @@ class PersonLog_model extends CI_Model $this->db->order_by('zeitpunkt', 'DESC'); $this->db->order_by('log_id', 'DESC'); + if (!is_null($taetigkeit_kurzbz)) + $this->db->where('taetigkeit_kurzbz='.$this->db->escape($taetigkeit_kurzbz)); if (!is_null($app)) $this->db->where('app='.$this->db->escape($app)); if (!is_null($oe_kurzbz)) diff --git a/application/views/system/infocenter/infocenter.php b/application/views/system/infocenter/infocenter.php index f5969b7dd..b569026d4 100644 --- a/application/views/system/infocenter/infocenter.php +++ b/application/views/system/infocenter/infocenter.php @@ -1,27 +1,56 @@ load->view('templates/FHC-Header', array('title' => 'Info Center', 'jquery3' => true, 'tablesorter' => true)); +$this->load->view('templates/FHC-Header', array('title' => 'Info Center', 'jquery3' => true, 'bootstrap' => true, 'fontawesome' => true, 'sbadmintemplate' => true, 'tablesorter' => false, 'customCSSs' => 'vendor/FHC-vendor/jquery-tableso +rter/css/theme.default.css', 'customJSs' => array('vendor/FHC-vendor/jquery-tablesorter/js/jquery.tablesorter.js', 'vendor/FHC-vendor/jquery-tablesorter/js/jquery.tablesorter.widgets.js'))); ?> -
- + +| Vorname | -vorname ?> | -
| Nachname | -- nachname ?> | -
| Geburtsdatum | -- gebdatum), 'd.m.Y') ?> | -
| Sozialversicherungsnr | -- svnr ?> | -
| Staatsbürgerschaft | -- staatsbuergerschaft ?> | -
| Geschlecht | -- geschlecht ?> | -
| Geburtsnation | -- geburtsnation ?> | -
| Geburtsort | -gebort ?> | -
| Kontakte | -|||
|---|---|---|---|
| Typ | -Kontakt | -Zustellung | -Anmerkung | -
| Vorname | +vorname ?> | +
| Nachname | ++ nachname ?> | +
| Geburtsdatum | ++ gebdatum), 'd.m.Y') ?> | +
| Sozialversicherungsnr | ++ svnr ?> | +
| Staatsbürgerschaft | ++ staatsbuergerschaft ?> | +
| Geschlecht | ++ geschlecht ?> | +
| Geburtsnation | ++ geburtsnation ?> | +
| Geburtsort | +gebort ?> | +
| Kontakte | +|||
|---|---|---|---|
| Typ | +Kontakt | +Zustellung | +Anmerkung | +
| kontakttyp); ?> | ++ kontakttyp === 'email'): ?> + + kontakt; + if ($kontakt->kontakttyp === 'email'): + ?> + + + | +zustellung === true ? '' : ''; ?> | +anmerkung; ?> | +
| + Adresse + | ++ strasse.', '.$adresse->plz.' '.$adresse->ort : '' ?> + | ++ zustelladresse === true ? '' : '' ?> + | ++ heimatadresse === true ? 'Heimatadresse' : '').($adresse->heimatadresse === true && $adresse->rechnungsadresse === true ? ', ' : '').($adresse->rechnungsadresse === true ? 'Rechnungsadresse' : ''); ?> + | +
| Name | -Typ | -Uploaddatum | -Ausstellungsnation | -Formal geprüft | - - - - formal_geprueft_amum) ? "checked" : ""; - ?> -||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| - titel) ? $dokument->bezeichnung : $dokument->titel ?> - | -dokument_bezeichnung ?> | -erstelltam), 'd.m.Y') ?> | -langtext ?> | -- /> - formal_geprueft_amum) ? date_format(date_create($dokument->formal_geprueft_amum), 'd.m.Y') : ''; ?> - | - +
| Name | +Typ | +Uploaddatum | +Ausstellungsnation | +Formal geprüft | + + + + formal_geprueft_amum) ? "checked" : ""; + ?> +
|---|---|---|---|---|
| + titel) ? $dokument->bezeichnung : $dokument->titel ?> + | +dokument_bezeichnung ?> | +erstelltam), 'd.m.Y') ?> | +langtext ?> | ++ /> + formal_geprueft_amum) ? date_format(date_create($dokument->formal_geprueft_amum), 'd.m.Y') : ''; ?> + | + -
Nachzureichende Dokumente:
-| Typ | -Nachzureichen am | -Ausstellungsnation | -Anmerkung | - - - -
|---|---|---|---|
| dokument_bezeichnung ?> | -- nachgereicht_am) ? date_format(date_create($dokument->nachgereicht_am), 'd.m.Y') : ''; ?> - | -- langtext ?> - | - -- anmerkung; ?> - | -
Nachzureichende Dokumente:
+| Typ | +Nachzureichen am | +Ausstellungsnation | +Anmerkung | + + + +
|---|---|---|---|
| dokument_bezeichnung ?> | ++ nachgereicht_am) ? date_format(date_create($dokument->nachgereicht_am), 'd.m.Y') : ''; ?> + | ++ langtext ?> + | + ++ anmerkung; ?> + | +