From e90e03e0ccc220a0af4e2970ce1e3282e58955f5 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Wed, 18 Mar 2026 13:47:24 +0100 Subject: [PATCH] infocenter: added info if registered with electronic onboarding, or login with Electronic Onboarding. controller: moved public methods up to public section, hand cursor appear on all links in Stammdaten section --- .../system/infocenter/InfoCenter.php | 206 ++++++++++-------- .../views/system/infocenter/stammdaten.php | 14 +- public/css/infocenter/infocenterDetails.css | 5 + system/phrasesupdate.php | 43 +++- 4 files changed, 170 insertions(+), 98 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index eaa207ff1..f10d94a8a 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -34,6 +34,9 @@ class InfoCenter extends Auth_Controller const PREV_FILTER_ID = 'prev_filter_id'; const KEEP_TABLESORTER_FILTER = 'keepTsFilter'; + const ONBOARDING_INSERTVON = 'onboarding'; + const ONBOARDING_KENNZEICHENTYP = 'eobRegistrierungsId'; + private $_uid; // contains the UID of the logged user // Used to log with PersonLogLib @@ -175,6 +178,7 @@ class InfoCenter extends Auth_Controller $this->load->model('person/Kontakt_model', 'KontaktModel'); $this->load->model('person/Geschlecht_model', 'GeschlechtModel'); $this->load->model('person/adresse_model', 'AdresseModel'); + $this->load->model('person/Kennzeichen_model', 'KennzeichenModel'); // Loads libraries $this->load->library('PersonLogLib'); @@ -1452,6 +1456,100 @@ class InfoCenter extends Auth_Controller $this->outputJsonSuccess("Done!"); } + + public function getAbsageData() + { + $stg_typ = $this->getStudienArtBerechtigung(['b', 'm']); + + if (!is_null($stg_typ)) + { + $statusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval; + $studienSemester = $this->variablelib->getVar('infocenter_studiensemester'); + $studiengaenge = $this->StudiengangModel->getStudiengaengeWithOrgForm(array_column($stg_typ, 'typ'), $studienSemester); + + $data = array ( + 'statusgruende' => $statusgruende, + 'studiengaenge' => $studiengaenge->retval + ); + + $this->outputJsonSuccess($data); + } + else + $this->outputJsonSuccess(null); + } + + public function getStudienArtBerechtigung($typ = null) + { + $studiengang_kz_all = $this->permissionlib->getSTG_isEntitledFor('infocenter'); + $stg_typ = $this->StudiengangModel->getStudiengangTyp($studiengang_kz_all, $typ); + return getData($stg_typ); + } + + public function getStudienartData() + { + $this->outputJsonSuccess($this->getStudienArtBerechtigung(['b', 'm', 'l'])); + } + + public function saveAbsageForAll() + { + $statusgrund = $this->input->post('statusgrund'); + $studiengang = $this->input->post('studiengang'); + $abgeschickt = $this->input->post('abgeschickt'); + $personen = $this->input->post('personen'); + $studienSemester = $this->variablelib->getVar('infocenter_studiensemester'); + + if ($statusgrund === 'null' || $studiengang === 'null' || $abgeschickt === 'null' || empty($personen)) + $this->terminateWithJsonError("Bitte füllen Sie alle Felder aus"); + + if ($studiengang === 'all' && $abgeschickt === 'all') + { + foreach($personen as $person) + { + $prestudenten = $this->PrestudentModel->getByPersonWithoutLehrgang($person, $studienSemester); + + if (!hasData($prestudenten)) + continue; + + $prestudentenData = getData($prestudenten); + + foreach ($prestudentenData as $prestudent) + { + $this->saveAbsage($prestudent->prestudent_id, $statusgrund); + } + } + } + else + { + $this->load->model('organisation/Studienplan_model', 'StudienplanModel'); + + $this->StudienplanModel->addSelect('1'); + $this->StudienplanModel->addJoin('lehre.tbl_studienordnung so', 'studienordnung_id'); + $escaped = $this->StudienplanModel->db->escape(strtoupper($studiengang)); + $this->StudienplanModel->db->where("UPPER(so.studiengangkurzbzlang || ':' || tbl_studienplan.orgform_kurzbz) = $escaped"); + $this->StudienplanModel->addLimit(1); + $studiengangResult = $this->StudienplanModel->load(); + + if (hasData($studiengangResult)) + { + foreach($personen as $person) + { + $prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester, $abgeschickt, $abgeschickt === 'all'); + + if (!hasData($prestudent)) + continue; + + $prestudentData = getData($prestudent); + $this->saveAbsage($prestudentData[0]->prestudent_id, $statusgrund); + } + } + else + $this->terminateWithJsonError("Falschen Studiengang übergeben!"); + + } + + $this->outputJsonSuccess("Success"); + } + // ----------------------------------------------------------------------------------------------------------------- // Private methods @@ -1946,6 +2044,17 @@ class InfoCenter extends Auth_Controller show_error(getError($user_person)); } + // add info about first electronig onboarding login + $this->KennzeichenModel->addSelect('insertamum'); + $onboarding_first_login = $this->KennzeichenModel->loadWhere( + array('person_id' => $person_id, 'kennzeichentyp_kurzbz' => self::ONBOARDING_KENNZEICHENTYP) + ); + + if (isError($onboarding_first_login)) + { + show_error(getError($onboarding_first_login)); + } + $data = array ( 'lockedby' => $lockedby, 'lockedbyother' => $lockedbyother, @@ -1955,7 +2064,9 @@ class InfoCenter extends Auth_Controller 'messages' => $messages->retval, 'logs' => $logs, 'notizen' => $notizen->retval, - 'notizenbewerbung' => $notizen_bewerbung->retval + 'notizenbewerbung' => $notizen_bewerbung->retval, + 'created_by_onboarding' => $stammdaten->retval->insertvon == self::ONBOARDING_INSERTVON, + 'onboarding_first_login' => hasData($onboarding_first_login) ? getData($onboarding_first_login)[0]->insertamum : null ); return $data; @@ -2375,97 +2486,4 @@ class InfoCenter extends Auth_Controller $this->loglib->logError('Studiengang has no mail for sending Freigabe mail'); } } - - public function getAbsageData() - { - $stg_typ = $this->getStudienArtBerechtigung(['b', 'm']); - - if (!is_null($stg_typ)) - { - $statusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval; - $studienSemester = $this->variablelib->getVar('infocenter_studiensemester'); - $studiengaenge = $this->StudiengangModel->getStudiengaengeWithOrgForm(array_column($stg_typ, 'typ'), $studienSemester); - - $data = array ( - 'statusgruende' => $statusgruende, - 'studiengaenge' => $studiengaenge->retval - ); - - $this->outputJsonSuccess($data); - } - else - $this->outputJsonSuccess(null); - } - - public function getStudienArtBerechtigung($typ = null) - { - $studiengang_kz_all = $this->permissionlib->getSTG_isEntitledFor('infocenter'); - $stg_typ = $this->StudiengangModel->getStudiengangTyp($studiengang_kz_all, $typ); - return getData($stg_typ); - } - - public function getStudienartData() - { - $this->outputJsonSuccess($this->getStudienArtBerechtigung(['b', 'm', 'l'])); - } - - public function saveAbsageForAll() - { - $statusgrund = $this->input->post('statusgrund'); - $studiengang = $this->input->post('studiengang'); - $abgeschickt = $this->input->post('abgeschickt'); - $personen = $this->input->post('personen'); - $studienSemester = $this->variablelib->getVar('infocenter_studiensemester'); - - if ($statusgrund === 'null' || $studiengang === 'null' || $abgeschickt === 'null' || empty($personen)) - $this->terminateWithJsonError("Bitte füllen Sie alle Felder aus"); - - if ($studiengang === 'all' && $abgeschickt === 'all') - { - foreach($personen as $person) - { - $prestudenten = $this->PrestudentModel->getByPersonWithoutLehrgang($person, $studienSemester); - - if (!hasData($prestudenten)) - continue; - - $prestudentenData = getData($prestudenten); - - foreach ($prestudentenData as $prestudent) - { - $this->saveAbsage($prestudent->prestudent_id, $statusgrund); - } - } - } - else - { - $this->load->model('organisation/Studienplan_model', 'StudienplanModel'); - - $this->StudienplanModel->addSelect('1'); - $this->StudienplanModel->addJoin('lehre.tbl_studienordnung so', 'studienordnung_id'); - $escaped = $this->StudienplanModel->db->escape(strtoupper($studiengang)); - $this->StudienplanModel->db->where("UPPER(so.studiengangkurzbzlang || ':' || tbl_studienplan.orgform_kurzbz) = $escaped"); - $this->StudienplanModel->addLimit(1); - $studiengangResult = $this->StudienplanModel->load(); - - if (hasData($studiengangResult)) - { - foreach($personen as $person) - { - $prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester, $abgeschickt, $abgeschickt === 'all'); - - if (!hasData($prestudent)) - continue; - - $prestudentData = getData($prestudent); - $this->saveAbsage($prestudentData[0]->prestudent_id, $statusgrund); - } - } - else - $this->terminateWithJsonError("Falschen Studiengang übergeben!"); - - } - - $this->outputJsonSuccess("Success"); - } } \ No newline at end of file diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php index c632b079f..73ea300ab 100644 --- a/application/views/system/infocenter/stammdaten.php +++ b/application/views/system/infocenter/stammdaten.php @@ -92,6 +92,14 @@
+ +
+ +
p->t('infocenter','onboardingRegistriert') ?>
+ +
p->t('infocenter','ersterOnboardingLogin').': '.date_format(date_create($onboarding_first_login), 'd.m.Y') ?>
+
+ @@ -191,12 +199,12 @@ diff --git a/public/css/infocenter/infocenterDetails.css b/public/css/infocenter/infocenterDetails.css index cf81d073b..10e8840c0 100644 --- a/public/css/infocenter/infocenterDetails.css +++ b/public/css/infocenter/infocenterDetails.css @@ -107,4 +107,9 @@ .gesperrtoption { color: gray; +} + +#onboardingRow +{ + margin-bottom: 15px; } \ No newline at end of file diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 3b3b6f995..5188dc346 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -57195,7 +57195,48 @@ I have been informed that I am under no obligation to consent to the transmissio ) ) ), - + // ### Infocenter Onboarding START + array( + 'app' => 'core', + 'category' => 'infocenter', + 'phrase' => 'onboardingRegistriert', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Über ElectronicOnboarding registriert', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Registered with Electronic Onboarding', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'infocenter', + 'phrase' => 'ersterOnboardingLogin', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Erster Electronic Onboarding Login', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'First Electronic Onboarding Login', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ) + // ### Infocenter Onboarding END );