From bf1bc8d1a97dbb52c2d1bd30a295a3909058da22 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Sun, 13 Oct 2024 13:32:15 +0200 Subject: [PATCH 01/34] added new contact type email unverifiziert and adresse type meldeadresse (mainly for electronic onboarding) --- system/dbupdate_3.4.php | 1 + ...14_electronic_onboarding_anbindung_ida.php | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 system/dbupdate_3.4/40314_electronic_onboarding_anbindung_ida.php diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index 11880fd55..d3b7b454d 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -58,6 +58,7 @@ require_once('dbupdate_3.4/17513_Entwicklungsteam.php'); require_once('dbupdate_3.4/28575_softwarebereitstellung.php'); require_once('dbupdate_3.4/41150_oe-pfad_db_view.php'); require_once('dbupdate_3.4/44031_stv_favorites.php'); +require_once('dbupdate_3.4/40314_electronic_onboarding_anbindung_ida.php'); // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/dbupdate_3.4/40314_electronic_onboarding_anbindung_ida.php b/system/dbupdate_3.4/40314_electronic_onboarding_anbindung_ida.php new file mode 100644 index 000000000..ccc0a5827 --- /dev/null +++ b/system/dbupdate_3.4/40314_electronic_onboarding_anbindung_ida.php @@ -0,0 +1,30 @@ +db_query("SELECT 1 FROM public.tbl_kontakttyp WHERE kontakttyp='email_unverifiziert'")) +{ + if($db->db_num_rows($result)==0) + { + $qry = "INSERT INTO public.tbl_kontakttyp(kontakttyp, beschreibung, bezeichnung_mehrsprachig) VALUES('email_unverifiziert', 'Unverifizierte E-Mail', '{\"Unverifizierte E-Mail\", \"Unverified email\"}');"; + + if(!$db->db_query($qry)) + echo 'Kontakttyp: '.$db->db_last_error().'
'; + else + echo '
Neuen Kontakttyp E-Mail unverifiziert in public.tbl_kontakttyp hinzugefügt'; + } +} + +// public.tbl_adressentyp: add type Meldeadresse +if($result = $db->db_query("SELECT 1 FROM public.tbl_adressentyp WHERE adressentyp_kurzbz='m'")) +{ + if($db->db_num_rows($result)==0) + { + $qry = "INSERT INTO public.tbl_adressentyp(adressentyp_kurzbz, bezeichnung, bezeichnung_mehrsprachig, sort) VALUES('m', 'Meldeadresse', '{\"Meldeadresse\", \"Registered adress\"}', 6);"; + + if(!$db->db_query($qry)) + echo 'Adressentyp: '.$db->db_last_error().'
'; + else + echo '
Neue Adressentyp Meldeadresse in public.tbl_adressentyp hinzugefügt'; + } +} From b8ff37eb8edfd28c897119d032c517533663574f Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Sat, 19 Oct 2024 17:25:09 +0200 Subject: [PATCH 02/34] added kontakt verifikation table for saving of kontakt verifikation data, added model for the table --- .../person/Kontaktverifikation_model.php | 42 ++++++++++++++++ ...14_electronic_onboarding_anbindung_ida.php | 48 +++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 application/models/person/Kontaktverifikation_model.php diff --git a/application/models/person/Kontaktverifikation_model.php b/application/models/person/Kontaktverifikation_model.php new file mode 100644 index 000000000..b15439edb --- /dev/null +++ b/application/models/person/Kontaktverifikation_model.php @@ -0,0 +1,42 @@ +dbTable = 'public.tbl_kontakt_verifikation'; + $this->pk = 'kontakt_verifikation_id'; + } + + /** + * Gets contact verification for a person and a verification code + * @param person_id + * @param kontakttyp + * @param verifikation_code + * @param expiration_days number of days after which verifikation code expires + * @return object success or error + */ + public function getKontaktVerifikation($person_id, $kontakttyp, $verifikation_code, $expiration_days = 1) + { + $qry = " + SELECT + kt.kontakt_id, + kv.verifikation_code + FROM + public.tbl_kontakt_verifikation kv + JOIN public.tbl_kontakt kt USING(kontakt_id) + WHERE kt.person_id = ? + AND kt.kontakttyp = ? + AND kv.verifikation_code = ? + AND kv.erstelldatum >= NOW() - INTERVAL '".$this->escape($expiration_days)." days' + ORDER BY + kt.kontakt_id DESC + LIMIT 1"; + + return $this->execQuery($qry, array($person_id, $kontakttyp, $verifikation_code)); + } +} diff --git a/system/dbupdate_3.4/40314_electronic_onboarding_anbindung_ida.php b/system/dbupdate_3.4/40314_electronic_onboarding_anbindung_ida.php index ccc0a5827..b204d45aa 100644 --- a/system/dbupdate_3.4/40314_electronic_onboarding_anbindung_ida.php +++ b/system/dbupdate_3.4/40314_electronic_onboarding_anbindung_ida.php @@ -28,3 +28,51 @@ if($result = $db->db_query("SELECT 1 FROM public.tbl_adressentyp WHERE adressent echo '
Neue Adressentyp Meldeadresse in public.tbl_adressentyp hinzugefügt'; } } + +if (!$result = @$db->db_query('SELECT 1 FROM public.tbl_kontakt_verifikation LIMIT 1')) +{ + $qry = "CREATE SEQUENCE public.tbl_kontakt_verifikation_kontakt_verifikation_id_seq + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + START WITH 1 + CACHE 1 + NO CYCLE; + + CREATE TABLE public.tbl_kontakt_verifikation + ( + kontakt_verifikation_id integer DEFAULT nextval('public.tbl_kontakt_verifikation_kontakt_verifikation_id_seq'::regclass), + kontakt_id integer UNIQUE NOT NULL, + verifikation_code varchar(32) UNIQUE NOT NULL, + erstelldatum timestamp without time zone, + verifikation_datum timestamp without time zone, + app varchar(32), + CONSTRAINT pk_tbl_kontakt_verifikation_id PRIMARY KEY (kontakt_verifikation_id) + ); + + ALTER TABLE public.tbl_kontakt_verifikation ADD CONSTRAINT fk_tbl_kontakt_verifikation_kontakt_id FOREIGN KEY (kontakt_id) + REFERENCES public.tbl_kontakt (kontakt_id) + ON DELETE CASCADE ON UPDATE CASCADE; + + ALTER TABLE public.tbl_kontakt_verifikation ADD CONSTRAINT fk_tbl_kontakt_verifikation_app FOREIGN KEY (app) + REFERENCES system.tbl_app (app) + ON DELETE RESTRICT ON UPDATE CASCADE; + + COMMENT ON TABLE public.tbl_kontakt_verifikation IS 'Contact verification'; + COMMENT ON COLUMN public.tbl_kontakt_verifikation.kontakt_id IS 'Contact to verify'; + COMMENT ON COLUMN public.tbl_kontakt_verifikation.verifikation_code IS 'Code generated for verification'; + COMMENT ON COLUMN public.tbl_kontakt_verifikation.erstelldatum IS 'Time when verification code was generated'; + COMMENT ON COLUMN public.tbl_kontakt_verifikation.verifikation_datum IS 'Time when contact was verified'; + COMMENT ON COLUMN public.tbl_kontakt_verifikation.app IS 'App where contact was verified'; + + GRANT SELECT, UPDATE, INSERT, DELETE ON public.tbl_kontakt_verifikation TO web; + GRANT SELECT, UPDATE, INSERT, DELETE ON public.tbl_kontakt_verifikation TO vilesci; + GRANT SELECT, UPDATE ON public.tbl_kontakt_verifikation_kontakt_verifikation_id_seq TO vilesci; + GRANT SELECT, UPDATE ON public.tbl_kontakt_verifikation_kontakt_verifikation_id_seq TO web; + "; + + if(!$db->db_query($qry)) + echo 'public.tbl_kontakt_verifikation: '.$db->db_last_error().'
'; + else + echo ' public.tbl_kontakt_verifikation: Tabelle hinzugefuegt
'; +} From add9263d35ff2a1883c5336a5329144714118882 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Mon, 11 Nov 2024 17:17:33 +0100 Subject: [PATCH 03/34] added Electronic Onboarding phrases --- system/phrasesupdate.php | 366 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 364 insertions(+), 2 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 7ef0269c9..29d5d6132 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -31025,8 +31025,370 @@ array( 'insertvon' => 'system' ) ) - ) - + ), + //**************************** FHC-Core-ElectronicOnboarding + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'emailFehlt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Email fehlt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Email is missing', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'emailUngueltig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Email ist ungültig', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'The email is not valid', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'emailRegistriert', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Diese Email ist bereits registriert. Bitte verwenden sie eine andere Email oder loggen sie sich mit einer anderen Methode ein.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'The email is already registered. Please choose a different email or use a different login method.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'bewerbungZugangEmailBetreff', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zugang zu Ihrer Bewerbung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Access to your application', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'bewerbungZugangEmailAnredeWeiblich', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Sehr geehrte Frau', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Dear Ms', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'bewerbungZugangEmailAnredeMaennlich', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Sehr geehrter Herr', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Dear Mr', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'bewerbungZugangEmailAnredeNeutral', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Sehr geehrte/r', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Dear', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'registrierungVerifzierenFuer', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Registrierung verifizieren für', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Verify registration for', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'registrierungVerifzieren', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Registrierung verifizieren', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Verify registration', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'vorname', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Vorname', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'First name', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'nachname', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nachname', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Last name', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'geburtsdatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Geburtsdatum', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Birth date', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'emailAdresse', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'E-Mail Adresse', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'E-mail address', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'emailGesendet', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Die E-Mail mit dem Link zu Ihrer Bewerbung wurde erfolgreich an {0} verschickt.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'The email with the link to your application has been successfully sent to {0}.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'emailGesendetHinweis', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'In der Regel erhalten Sie das Mail in wenigen Minuten. Wenn Sie nach 24 Stunden noch kein Mail erhalten haben, + kontaktieren Sie bitte unsere {0}Studienberatung{1}', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'You should receive an e-mail within a few minutes. If you receive no e-mail within 24 hours please contact + our {0}student counselling team{1}.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'fehlerBeiRegistrierung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler bei der Registrierung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error when registering', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'fehlerBeiRegistrierungText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Da ist etwas schief gelaufen. Wir bitten um Entschuldigung.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Sorry, something went wrong.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'fehlerBeiRegistrierungNochmalVersuchen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nochmals versuchen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Try again', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From b63146a8d89cdc4f08213350170346b1956cd560 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Wed, 20 Nov 2024 15:03:59 +0100 Subject: [PATCH 04/34] added MeldezettelJob for accepting Meldezettel of students with Meldeadresse --- .../controllers/jobs/MeldezettelJob.php | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 application/controllers/jobs/MeldezettelJob.php diff --git a/application/controllers/jobs/MeldezettelJob.php b/application/controllers/jobs/MeldezettelJob.php new file mode 100644 index 000000000..329597985 --- /dev/null +++ b/application/controllers/jobs/MeldezettelJob.php @@ -0,0 +1,86 @@ +_ci =& get_instance(); + + $this->_ci->load->model('crm/Dokumentprestudent_model', 'DokumentprestudentModel'); + } + + /** + * Sets Meldezettel to "accepted" for all students with Meldeadresse. + */ + public function acceptMeldezettel() + { + $this->logInfo('Start Meldezettel Job'); + + $params = array(self::DOKUMENT_KURZBZ); + + $qry = " + -- get all prestudents with meldeadresse, but no accepted Meldezettel + SELECT + DISTINCT prestudent_id + FROM + public.tbl_adresse + JOIN public.tbl_person USING (person_id) + JOIN public.tbl_prestudent ps USING (person_id) + WHERE + typ = 'm' + AND NOT EXISTS ( + SELECT + 1 + FROM + public.tbl_dokumentprestudent + WHERE + prestudent_id = ps.prestudent_id + AND dokument_kurzbz = ? + )"; + + // get all prestudents with Meldeadresse and no accpeted Meldezettel + $result = $this->_ci->DokumentprestudentModel->execReadOnlyQuery($qry, $params); + + if (isError($result)) + { + $this->logError(getError($result)); + } + + $count = 0; + + if (hasData($result)) + { + $prestudents = getData($result); + + foreach ($prestudents as $prestudent) + { + // set Meldezettel to accepted + $result = $this->_ci->DokumentprestudentModel->insert( + array( + 'prestudent_id' => $prestudent->prestudent_id, + 'dokument_kurzbz' => self::DOKUMENT_KURZBZ, + 'datum' => date('Y-m-d'), + 'insertamum' => strftime('%Y-%m-%d %H:%M'), + 'insertvon' => self::INSERT_VON + ) + ); + + if (isError($result)) + $this->logError(getError($result)); + else + $count++; + } + } + + $this->logInfo('End Meldezettel Job', array('Number of changes ' => $count)); + } +} From 0a97b39efbb877ff3f7a07ca0d531434b54cb3ca Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Tue, 24 Dec 2024 19:14:04 +0100 Subject: [PATCH 05/34] added phrases for electronic onboarding verification page --- .../person/Kontaktverifikation_model.php | 2 +- system/phrasesupdate.php | 137 +++++++++++++++++- 2 files changed, 132 insertions(+), 7 deletions(-) diff --git a/application/models/person/Kontaktverifikation_model.php b/application/models/person/Kontaktverifikation_model.php index b15439edb..17bcb1c35 100644 --- a/application/models/person/Kontaktverifikation_model.php +++ b/application/models/person/Kontaktverifikation_model.php @@ -29,7 +29,7 @@ class Kontaktverifikation_model extends DB_Model FROM public.tbl_kontakt_verifikation kv JOIN public.tbl_kontakt kt USING(kontakt_id) - WHERE kt.person_id = ? + WHERE kt.person_id = ? AND kt.kontakttyp = ? AND kv.verifikation_code = ? AND kv.erstelldatum >= NOW() - INTERVAL '".$this->escape($expiration_days)." days' diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 8d7bdd939..843a055a1 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -31310,18 +31310,18 @@ array( array( 'app' => 'core', 'category' => 'onboarding', - 'phrase' => 'registrierungVerifzierenFuer', + 'phrase' => 'bewerbungVerifizierung', 'insertvon' => 'system', 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Registrierung verifizieren für', + 'text' => 'Verifizierung Ihrer Bewerbung', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Verify registration for', + 'text' => 'Application verification', 'description' => '', 'insertvon' => 'system' ) @@ -31330,18 +31330,143 @@ array( array( 'app' => 'core', 'category' => 'onboarding', - 'phrase' => 'registrierungVerifzieren', + 'phrase' => 'bewerbungVerifzieren', 'insertvon' => 'system', 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Registrierung verifizieren', + 'text' => 'Bewerbung verifizieren', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Verify registration', + 'text' => 'Verify application', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'bewerbungVerifizierungEinleitung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Wenn Ihre Daten stimmen, geben Sie bitte Ihre E-Mail Adresse ein und drücken Sie auf "Bewerbung verfifizieren". +Danach erhalten Sie eine E-Mail mit dem Link zu Ihrer Bewerbung an die angegebene Adresse. +Dort können Sie Studienrichtungen hinzufügen, Ihre Daten vervollständigen, und sich unverbindlich bewerben.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'If your data is correct, please enter your email and click "Verify application". +We will then send you a link via e-mail to the address specified. There, you can add personal information or degree programs and submit non-binding applications.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'bewerbungVerifizierungKontakthinweis', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Wenn Sie mehr Informationen benötigen, steht Ihnen unsere Studienberatung gerne persönlich, telefonisch, per E-Mail oder WhatsApp zur Verfügung.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Should you require any additional information, please do not hesitate to contact our student counselling team in person, by phone, or via e-mail or WhatsApp.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'bewerbungVerifizierungDatenschutzhinweis', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Datenschutz-Hinweis', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Privacy information', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'bewerbungVerifizierungDatenschutzhinweisText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Die uns von Ihnen zum Zwecke der Bewerbung bekanntgegebenen Daten werden von uns ausschließlich zur Abwicklung der Bewerbung auf der Grundlage von vor- bzw vertraglichen Zwecken verarbeitet und mit der unten beschriebenen Ausnahme bei Unklarheiten betreffend die Zugangsvoraussetzungen nicht an Dritte weitergegeben. +Kommt es zu keinem weiteren Kontakt bzw zu keiner Aufnahme, löschen wir Ihre Daten nach drei Jahren.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'The data communicated to us by you for the purpose of the application will be used by us exclusively for the processing of the application on the basis of pre-contractual or contractual purposes and will not be passed on to third parties with the exception described below in case of uncertainties regarding the entry requirements. +If there is no further contact or enrolment, your data will be deleted after three years.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'bewerbungVerifizierungInformationenDatenschutzGrundverordnung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Informationen zu Ihren Betroffenenrechten finden Sie hier:', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Information on your data subject rights can be found here:', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'bewerbungVerifizierungDatenschutzFragen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bei Fragen stehen wir Ihnen jederzeit unter folgender Mail zur Verfügung: ', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'If you have any questions, please contact us at ', 'description' => '', 'insertvon' => 'system' ) From 115b35ad7b40f3b27a161c5a8859ca019f1924e5 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Wed, 8 Jan 2025 14:52:32 +0100 Subject: [PATCH 06/34] electronic onboarding: changed phrase for error display --- system/phrasesupdate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 843a055a1..4de9cbb03 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -31622,13 +31622,13 @@ If there is no further contact or enrolment, your data will be deleted after thr 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Da ist etwas schief gelaufen. Wir bitten um Entschuldigung.', + 'text' => 'Es ist ein Fehler bei der Registrierung aufgetreten.', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Sorry, something went wrong.', + 'text' => 'An error occured during registration.', 'description' => '', 'insertvon' => 'system' ) From 08cb3d3809b34b43eb87558a02a5ae702e4c8681 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Thu, 16 Jan 2025 21:02:01 +0100 Subject: [PATCH 07/34] electronic onboarding phrase typo fix --- system/phrasesupdate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 4de9cbb03..7f030e62b 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -31355,7 +31355,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Wenn Ihre Daten stimmen, geben Sie bitte Ihre E-Mail Adresse ein und drücken Sie auf "Bewerbung verfifizieren". + 'text' => 'Wenn Ihre Daten stimmen, geben Sie bitte Ihre E-Mail Adresse ein und drücken Sie auf "Bewerbung verifizieren". Danach erhalten Sie eine E-Mail mit dem Link zu Ihrer Bewerbung an die angegebene Adresse. Dort können Sie Studienrichtungen hinzufügen, Ihre Daten vervollständigen, und sich unverbindlich bewerben.', 'description' => '', From 39ada202774fbb77811a2cd54bd96f2a046917aa Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Wed, 22 Jan 2025 15:26:25 +0100 Subject: [PATCH 08/34] Electronic Onboarding: added phrases --- system/phrasesupdate.php | 102 +++++++++++++++++++++++++++++++-------- 1 file changed, 82 insertions(+), 20 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 7f030e62b..e177274ec 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -31307,26 +31307,6 @@ array( ) ) ), - array( - 'app' => 'core', - 'category' => 'onboarding', - 'phrase' => 'bewerbungVerifizierung', - 'insertvon' => 'system', - 'phrases' => array( - array( - 'sprache' => 'German', - 'text' => 'Verifizierung Ihrer Bewerbung', - 'description' => '', - 'insertvon' => 'system' - ), - array( - 'sprache' => 'English', - 'text' => 'Application verification', - 'description' => '', - 'insertvon' => 'system' - ) - ) - ), array( 'app' => 'core', 'category' => 'onboarding', @@ -31654,6 +31634,88 @@ If there is no further contact or enrolment, your data will be deleted after thr ) ) ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'zustimmungDatenuebermittlung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Können in Ausnahmefällen die Zugangsvoraussetzungen von der FH Technikum Wien nicht abschließend abgeklärt werden, erteile ich die Zustimmung, dass die FH Technikum Wien die Dokumente zur Überprüfung an die zuständigen Behörden weiterleiten kann.
+Ich wurde darüber informiert, dass ich nicht verpflichtet bin, der Übermittlung meiner Daten zuzustimmen. Diese Zustimmung ist allerdings notwendig, um die Bewerbung berücksichtigen zu können.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'If in exceptional cases the admission requirements can not be finally clarified by the UAS Technikum Wien, I give my consent that the UAS Technikum Wien can forward the documents to the competent authorities for verification.
+I have been informed that I am under no obligation to consent to the transmission of my data. However, this consent is necessary in order for the application to be considered.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'zustimmungDatenschutzerklaerung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Ich habe die Datenschutzerklärung zu Kenntnis genommen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'I have taken note of the privacy policy.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'bitteDatenuebermittlungZustimmen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Sie müssen der Datenübermittlung zustimmen, um Ihre Bewerbung abschicken zu können.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'You have to consent the transmission of your data to send the application.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'onboarding', + 'phrase' => 'bitteDatenschutzerklaerungZustimmen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Sie müssen der Datenschutzerklärung zustimmen, um Ihre Bewerbung abschicken zu können.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'You have to consent to the privacy statement to send the application.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ) ); From ea2be8026b463c8cf9c7132197aea82831aa9886 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 12 Mar 2025 08:06:23 +0100 Subject: [PATCH 09/34] filter hidden from kontakttyp, show typ.beschreibung in dropdown --- .../controllers/api/frontend/v1/stv/Kontakt.php | 15 ++++++++------- .../Details/Kontakt/Contact.js | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/application/controllers/api/frontend/v1/stv/Kontakt.php b/application/controllers/api/frontend/v1/stv/Kontakt.php index fd16fff06..1c3c0c95d 100644 --- a/application/controllers/api/frontend/v1/stv/Kontakt.php +++ b/application/controllers/api/frontend/v1/stv/Kontakt.php @@ -439,6 +439,7 @@ class Kontakt extends FHCAPI_Controller $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL); } $this->terminateWithSuccess((getData($result) ?: [])); + } public function getKontakttypen() @@ -446,13 +447,13 @@ class Kontakt extends FHCAPI_Controller $this->load->model('person/Kontakttyp_model', 'KontakttypModel'); $result = $this->KontakttypModel->load(); - if (isError($result)) { - $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL); - } - else - { - $this->terminateWithSuccess(getData($result) ?: []); - } + + $data = $this->getDataOrTerminateWithError($result); + + $filteredData = array_filter($data, function ($item) { + return $item->kontakttyp !== "hidden"; + }); + $this->terminateWithSuccess($filteredData); } public function loadContact() diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Kontakt/Contact.js b/public/js/components/Stv/Studentenverwaltung/Details/Kontakt/Contact.js index 87dc70eb1..0bda648a9 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Kontakt/Contact.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Kontakt/Contact.js @@ -322,7 +322,7 @@ export default{ v-model="contactData.kontakttyp"> > - + From 239eace246349288b1146c1c684243e59e5721af Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Fri, 27 Jun 2025 23:14:56 +0200 Subject: [PATCH 10/34] registration links to Bewerbungstool: changed in infocenter and fas, studentenverwaltung so that user email is not verified --- application/views/system/infocenter/stammdaten.php | 2 +- .../js/components/Stv/Studentenverwaltung/Details/Details.js | 4 ++-- rdf/student.rdf.php | 2 +- vilesci/personen/personendetails.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php index f143c9c03..4806d979a 100644 --- a/application/views/system/infocenter/stammdaten.php +++ b/application/views/system/infocenter/stammdaten.php @@ -188,7 +188,7 @@ zugangscode)): ?> diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Details.js b/public/js/components/Stv/Studentenverwaltung/Details/Details.js index ae4f92b20..3ca656697 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Details.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Details.js @@ -153,7 +153,7 @@ export default { @@ -459,4 +459,4 @@ export default { ` -}; \ No newline at end of file +}; diff --git a/rdf/student.rdf.php b/rdf/student.rdf.php index 40cf28e01..f16f8a7b0 100644 --- a/rdf/student.rdf.php +++ b/rdf/student.rdf.php @@ -349,7 +349,7 @@ function draw_content($row) uid)?$row->uid.'@'.DOMAIN:'').']]> zugangscode.']]> - zugangscode.'&emailAdresse='.$mail_privat.']]> + zugangscode.'&emailAdresse='.$mail_privat.'&keepEmailUnverified=true]]> bpk.']]> diff --git a/vilesci/personen/personendetails.php b/vilesci/personen/personendetails.php index a20e34c5d..684b21712 100644 --- a/vilesci/personen/personendetails.php +++ b/vilesci/personen/personendetails.php @@ -153,7 +153,7 @@ echo "Name: $person->titelpre $person->nachname $ echo "Geburtsdatum: ".$datum_obj->formatDatum($person->gebdatum,'d.m.Y').""; echo "Geschlecht: ".$person->geschlecht.""; echo "Anmerkung: ".$db->convert_html_chars($person->anmerkungen).""; -echo "Zugangscode:".(in_array('bewerbung', (explode(';', ACTIVE_ADDONS)))?"".$db->convert_html_chars($person->zugangscode)."":$db->convert_html_chars($person->zugangscode)).""; +echo "Zugangscode:".(in_array('bewerbung', (explode(';', ACTIVE_ADDONS)))?"".$db->convert_html_chars($person->zugangscode)."":$db->convert_html_chars($person->zugangscode)).""; echo ''; echo '
Statusinformation - FH Ausweis
'; From 31f0be35c876a39eb7d2bcfaae57039e9932dfa7 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 2 Jul 2025 12:53:54 +0200 Subject: [PATCH 11/34] selbe person auch wenn nicht abbrecher --- application/models/person/Person_model.php | 116 +++++++++------------ 1 file changed, 52 insertions(+), 64 deletions(-) diff --git a/application/models/person/Person_model.php b/application/models/person/Person_model.php index 997048972..3947378cf 100644 --- a/application/models/person/Person_model.php +++ b/application/models/person/Person_model.php @@ -307,72 +307,60 @@ class Person_model extends DB_Model public function checkDuplicate($person_id) { - $qry = "SELECT person_id - FROM public.tbl_prestudent p - JOIN - ( - SELECT DISTINCT ON(prestudent_id) * - FROM public.tbl_prestudentstatus - WHERE prestudent_id IN - ( - SELECT prestudent_id - FROM public.tbl_prestudent - WHERE person_id IN - ( - SELECT p2.person_id - FROM public.tbl_person p - JOIN public.tbl_person p2 - ON lower(p.vorname) = lower(p2.vorname) - AND lower(p.nachname) = lower(p2.nachname) - AND p.gebdatum = p2.gebdatum - AND p.person_id = ? - ) - ) - ORDER BY prestudent_id, datum DESC, insertamum DESC - ) ps USING(prestudent_id) - JOIN public.tbl_status USING(status_kurzbz) + $qry = " + WITH person AS ( + SELECT * + FROM public.tbl_person + WHERE person_id = ? + ), + allePersonen AS ( + SELECT p.person_id + FROM public.tbl_person p + JOIN person + ON lower(p.vorname) = lower(person.vorname) + AND lower(p.nachname) = lower(person.nachname) + AND p.gebdatum = person.gebdatum + ), + lastStatus AS ( + SELECT DISTINCT ON (tbl_prestudentstatus.prestudent_id) + tbl_prestudentstatus.prestudent_id, + tbl_prestudentstatus.status_kurzbz, + tbl_prestudent.studiengang_kz, + tbl_prestudent.person_id + FROM public.tbl_prestudentstatus + JOIN public.tbl_prestudent USING (prestudent_id) + WHERE tbl_prestudent.person_id IN (SELECT person_id FROM allePersonen) + ORDER BY tbl_prestudentstatus.prestudent_id, tbl_prestudentstatus.datum DESC, tbl_prestudentstatus.insertamum DESC + ), + interessenten AS ( + SELECT * + FROM lastStatus WHERE status_kurzbz = 'Interessent' - AND studiengang_kz IN - ( - SELECT studiengang_kz - FROM public.tbl_prestudent p - JOIN - ( - SELECT DISTINCT ON(prestudent_id) * - FROM public.tbl_prestudentstatus - WHERE prestudent_id IN - ( - SELECT prestudent_id - FROM public.tbl_prestudent - WHERE person_id IN - ( - SELECT p2.person_id - FROM public.tbl_person p - JOIN public.tbl_person p2 - ON lower(p.vorname) = lower(p2.vorname) - AND lower(p.nachname) = lower(p2.nachname) - AND p.gebdatum = p2.gebdatum - AND p.person_id = ? - ) - ) - ORDER BY prestudent_id, datum DESC, insertamum DESC - ) ps USING(prestudent_id) - JOIN public.tbl_status USING(status_kurzbz) - WHERE status_kurzbz = 'Abbrecher' - ) - - UNION - + ), + keineInteressenten AS ( + SELECT * + FROM lastStatus + WHERE status_kurzbz != 'Interessent' + ), + doppeltePerson AS ( SELECT p2.person_id - FROM tbl_person p1 - JOIN tbl_prestudent ps ON p1.person_id = ps.person_id - INNER JOIN ( - SELECT vorname, nachname, gebdatum, person.person_id - FROM tbl_person person - JOIN tbl_prestudent sps ON person.person_id = sps.person_id - ) p2 - ON (lower(p1.vorname) = lower(p2.vorname) AND lower(p1.nachname) = lower(p2.nachname) AND p1.gebdatum = p2.gebdatum) - WHERE p1.person_id != p2.person_id AND (p1.person_id = ?)"; + FROM public.tbl_person p1 + JOIN public.tbl_prestudent ps1 ON ps1.person_id = p1.person_id + JOIN public.tbl_person p2 + ON lower(p1.vorname) = lower(p2.vorname) + AND lower(p1.nachname) = lower(p2.nachname) + AND p1.gebdatum = p2.gebdatum + WHERE p1.person_id = ? + AND p1.person_id <> p2.person_id + ) + SELECT DISTINCT(interessenten.person_id) + FROM interessenten + JOIN keineInteressenten + ON interessenten.studiengang_kz = keineInteressenten.studiengang_kz + WHERE interessenten.person_id = ? + UNION + SELECT DISTINCT person_id + FROM doppeltePerson"; return $this->execQuery($qry, array($person_id, $person_id, $person_id)); } From aca49114be9f54a4b814d125967af6e991b47987 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 7 Jul 2025 09:56:34 +0200 Subject: [PATCH 12/34] anmerkung zur bewerbung weiterleiten --- .../views/system/infocenter/anmerkungenZurBewerbung.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/views/system/infocenter/anmerkungenZurBewerbung.php b/application/views/system/infocenter/anmerkungenZurBewerbung.php index ca012ff3e..3ffe5f9a2 100644 --- a/application/views/system/infocenter/anmerkungenZurBewerbung.php +++ b/application/views/system/infocenter/anmerkungenZurBewerbung.php @@ -18,6 +18,9 @@ kurzbzlang)) ?: print_r('(' . nl2br($notiz->kurzbzlang) . ') - ') ?> text) ?> + + + From 12cdf5a83ef4c2b0e09fbefd25b32e638f8a756d Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Fri, 11 Jul 2025 17:11:19 +0200 Subject: [PATCH 13/34] =?UTF-8?q?accepting=20documents:=20enabled=20accept?= =?UTF-8?q?ing=20for=20all=20Studieng=C3=A4nge,=20not=20just=20master,=20a?= =?UTF-8?q?dded=20date=20and=20insertamum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/dokument.class.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/include/dokument.class.php b/include/dokument.class.php index 6dec9a66d..7b1d490fb 100644 --- a/include/dokument.class.php +++ b/include/dokument.class.php @@ -888,9 +888,10 @@ class dokument extends basis_db * Akzeptiert ein bestimmtes Dokument * @param char $dokument_kurzbz Bezeichner Dokument. * @param int $person_id Personenkennzeichen. + * @param array $studiengang_typen einschränken nach Studiengang Typ. * @return boolean true wenn akzeptiert bzw geprüft ohne Akzeptieren, false wenn Fehler */ - public function akzeptiereDokument($dokument_kurzbz, $person_id) + public function akzeptiereDokument($dokument_kurzbz, $person_id, $studiengang_typen = null) { $db = new basis_db(); $arrayDoksZuAkzeptieren = array(); @@ -902,7 +903,6 @@ class dokument extends basis_db tbl_prestudent ps, tbl_studiengang sg WHERE ps.studiengang_kz = sg.studiengang_kz - AND sg.typ = 'm' AND person_id = ".$this->db_add_param($person_id)." AND not exists( SELECT * @@ -910,6 +910,11 @@ class dokument extends basis_db where dok.prestudent_id = ps.prestudent_id and dokument_kurzbz = ".$this->db_add_param($dokument_kurzbz).")"; + if (isset($studiengang_typen) && is_array($studiengang_typen) && !empty($studiengang_typen)) + { + $qry .= ' AND sg.typ IN ('. $db->db_implode4SQL($studiengang_typen).')'; + } + //gibt ein Array von zu akzeptierenden Dokumenten zurück if ($db->db_query($qry)) { @@ -923,11 +928,14 @@ class dokument extends basis_db } //für alle prestudent_ids das Dokument akzeptieren - $qry = "INSERT INTO public.tbl_dokumentprestudent(dokument_kurzbz, prestudent_id) VALUES"; + $qry = "INSERT INTO public.tbl_dokumentprestudent(dokument_kurzbz, prestudent_id, datum, insertamum) VALUES"; foreach ($arrayDoksZuAkzeptieren as $prestudent_id) { - $qry .= "(".$this->db_add_param($dokument_kurzbz). ",". $prestudent_id. ")"; + $qry .= "(".$this->db_add_param($dokument_kurzbz). + ",".$this->db_add_param($prestudent_id, FHC_INTEGER). + ",".$this->db_add_param(date('Y-m-d')). + ",".$this->db_add_param(strftime('%Y-%m-%d %H:%M')). ")"; if (next($arrayDoksZuAkzeptieren) == true) { From 34a239a823ffdea8b6dac04b5471d0e0bcb74179 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 13 Aug 2025 14:54:43 +0200 Subject: [PATCH 14/34] Set Foto to null instead of empty String when Deleted --- application/controllers/api/frontend/v1/stv/Student.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/controllers/api/frontend/v1/stv/Student.php b/application/controllers/api/frontend/v1/stv/Student.php index ac09f39bb..70970d8b5 100644 --- a/application/controllers/api/frontend/v1/stv/Student.php +++ b/application/controllers/api/frontend/v1/stv/Student.php @@ -276,9 +276,14 @@ class Student extends FHCAPI_Controller $update_person = array(); foreach ($array_allowed_props_person as $prop) { $val = $this->input->post($prop); - if ($val !== null) { + if ($val !== null) + { $update_person[$prop] = $val; } + if($prop == 'foto' && $val == '') + { + $update_person[$prop] = null; + } } $array_allowed_props_student = ['matrikelnr']; From 4d78abf9ec2586e99b02c72f369fabd86814332e Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 14 Aug 2025 13:15:10 +0200 Subject: [PATCH 15/34] Tab Prestudent: use false for boolean and null for other variables for update if field is empty --- .../controllers/api/frontend/v1/stv/Prestudent.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/application/controllers/api/frontend/v1/stv/Prestudent.php b/application/controllers/api/frontend/v1/stv/Prestudent.php index 4d0aa5fe1..2a427e569 100644 --- a/application/controllers/api/frontend/v1/stv/Prestudent.php +++ b/application/controllers/api/frontend/v1/stv/Prestudent.php @@ -142,15 +142,15 @@ class Prestudent extends FHCAPI_Controller $update_prestudent[$prop] = $val; } - // allowed to be null, but has to be in postparameter - if ( - in_array($prop, ['zgvdatum', 'zgvmadatum', 'zgvdoktordatum', 'zgv_code', 'zgvmas_code', 'zgvdoktor_code']) - && !isset($update_prestudent[$prop]) - && array_key_exists($prop, $_POST) - ) - { + //set null instead of empty string + if ($val === '' && ($prop != 'dual' || $prop != 'bismelden')){ $update_prestudent[$prop] = null; } + + //set false instead of empty string if boolean + if ($val === '' && ($prop === 'dual' || $prop === 'bismelden')) { + $update_prestudent[$prop] = false; + } } $update_prestudent['updateamum'] = date('c'); From 729618cbe7327da8dcc35b00dc04aa3e0cf166e7 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 14 Aug 2025 15:38:03 +0200 Subject: [PATCH 16/34] Tab Status: change format for Date for Check Bismeldestichtag --- application/controllers/api/frontend/v1/stv/Status.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/controllers/api/frontend/v1/stv/Status.php b/application/controllers/api/frontend/v1/stv/Status.php index 629d5512a..7edb0305c 100644 --- a/application/controllers/api/frontend/v1/stv/Status.php +++ b/application/controllers/api/frontend/v1/stv/Status.php @@ -287,11 +287,11 @@ class Status extends FHCAPI_Controller ]); $this->form_validation->set_rules('_default', '', [ - ['meldestichtag_not_exceeded', function () use ($datum, $isBerechtigtNoStudstatusCheck) { + ['meldestichtag_not_exceeded', function () use ($datum_string, $isBerechtigtNoStudstatusCheck) { if ($isBerechtigtNoStudstatusCheck) return true; // Skip if access right says so - $result = $this->prestudentstatuschecklib->checkIfMeldestichtagErreicht($datum); + $result = $this->prestudentstatuschecklib->checkIfMeldestichtagErreicht($datum_string); return !$this->getDataOrTerminateWithError($result); }], @@ -733,6 +733,7 @@ class Status extends FHCAPI_Controller $result = $this->prestudentstatuschecklib->checkIfMeldestichtagErreicht($oldstatus->datum); + //TODO(Manu) comment out: should not appear during delete (shiva) if (!$this->getDataOrTerminateWithError($result)) $this->terminateWithError( $this->p->t('lehre', 'error_dataVorMeldestichtag'), From a42e70e2fef192977b63926f64975f15070aa308 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 14 Aug 2025 16:28:20 +0200 Subject: [PATCH 17/34] comment out check Bismeldestichtag for deleteStatus --- application/controllers/api/frontend/v1/stv/Status.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/controllers/api/frontend/v1/stv/Status.php b/application/controllers/api/frontend/v1/stv/Status.php index 7edb0305c..fdf2bc66a 100644 --- a/application/controllers/api/frontend/v1/stv/Status.php +++ b/application/controllers/api/frontend/v1/stv/Status.php @@ -731,15 +731,15 @@ class Status extends FHCAPI_Controller REST_Controller::HTTP_FORBIDDEN ); - $result = $this->prestudentstatuschecklib->checkIfMeldestichtagErreicht($oldstatus->datum); + //TODO(Manu) check this check, meanwhile not active +/* $result = $this->prestudentstatuschecklib->checkIfMeldestichtagErreicht($oldstatus->datum); - //TODO(Manu) comment out: should not appear during delete (shiva) if (!$this->getDataOrTerminateWithError($result)) $this->terminateWithError( $this->p->t('lehre', 'error_dataVorMeldestichtag'), self::ERROR_TYPE_GENERAL, REST_Controller::HTTP_FORBIDDEN - ); + );*/ } // Start DB transaction From 045b764d654d44229fc97112673f712013384659 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 26 Aug 2025 12:40:27 +0200 Subject: [PATCH 18/34] studentenverwaltung im infocenter verlinkt --- application/controllers/system/infocenter/InfoCenter.php | 2 ++ application/views/system/infocenter/infocenterDetails.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 1fc49c72f..1a4f566e6 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -362,6 +362,8 @@ class InfoCenter extends Auth_Controller $data[self::ORIGIN_PAGE] = $origin_page; $data[self::PREV_FILTER_ID] = $this->input->get(self::PREV_FILTER_ID); + $data['studiensemester'] = $this->variablelib->getVar('infocenter_studiensemester'); + $this->load->view('system/infocenter/infocenterDetails.php', $data); } diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index 51b913b6c..fb023c5fd 100644 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -57,7 +57,7 @@
From 34528bb01446fb9f522589a63b2e310d4037f3c5 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Fri, 29 Aug 2025 13:19:00 +0200 Subject: [PATCH 19/34] iframe content hinzugefuegt --- public/js/components/Cis/Cms/Content.js | 5 ++ system/dbupdate_3.4.php | 1 + .../63436_cis4_iframe_component.php | 81 +++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 system/dbupdate_3.4/63436_cis4_iframe_component.php diff --git a/public/js/components/Cis/Cms/Content.js b/public/js/components/Cis/Cms/Content.js index 470a0fa62..ec1bc8a76 100644 --- a/public/js/components/Cis/Cms/Content.js +++ b/public/js/components/Cis/Cms/Content.js @@ -2,6 +2,8 @@ import raum_contentmittitel from './Content_types/Raum_contentmittitel.js' import general from './Content_types/General.js' import BsConfirm from "../../Bootstrap/Confirm.js"; import news_content from './Content_types/News_content.js'; +import iframe_content from './Content_types/Iframe_content.js'; + import ApiCms from '../../../api/factory/cms.js'; export default { @@ -24,6 +26,7 @@ export default { raum_contentmittitel, news_content, general, + iframe_content }, data() { return { @@ -83,6 +86,8 @@ export default { return "raum_contentmittitel"; case "news": return "news_content"; + case "iframe": + return "iframe_content"; default: return "general"; }; diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index cf2f40ca8..23ad5ffcd 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -77,6 +77,7 @@ require_once('dbupdate_3.4/55614_perm_verwaltetoe.php'); require_once('dbupdate_3.4/25999_C4_dashboard.php'); require_once('dbupdate_3.4/61730_Dashboard_Anpassungen.php'); require_once('dbupdate_3.4/40128_search.php'); +require_once('dbupdate_3.4/63436_cis4_iframe_component.php'); // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/dbupdate_3.4/63436_cis4_iframe_component.php b/system/dbupdate_3.4/63436_cis4_iframe_component.php new file mode 100644 index 000000000..abff4b7e1 --- /dev/null +++ b/system/dbupdate_3.4/63436_cis4_iframe_component.php @@ -0,0 +1,81 @@ + + + + + + + + + +EOD; + +$xslt_xhtml= << + + + + + + + +
Keine URL im Inhalt gefunden.
+
+
+
+ +EOD; + +$xslt_xhtml_c4= << + + + + + + + +
Keine URL im Inhalt gefunden.
+
+
+
+ +EOD; + + +if ($result = @$db->db_query("SELECT * FROM campus.tbl_template WHERE template_kurzbz='iframe2'")) +{ + if ($db->db_num_rows($result) == 0) + { + $sql= <<db_query($sql)) + { + echo 'campus.tbl_template: ' . $db->db_last_error() . '
'; + } + else + { + echo ' campus.tbl_template: Template "iframe" hinzugefügt.
'; + } + + } +} \ No newline at end of file From d9c716a62b9d732f9ccc5e4fe7f7b8331b1ce67d Mon Sep 17 00:00:00 2001 From: chfhtw Date: Fri, 12 Sep 2025 08:37:18 +0200 Subject: [PATCH 20/34] convert wert from public.tbl_variable to TEXT --- .../api/frontend/v1/stv/Favorites.php | 11 ------- .../Stv/Studentenverwaltung/Verband.js | 32 +++---------------- system/FHComplete-3.3.sql | 2 +- system/dbupdate_3.4.php | 1 + .../63394_Variablenbeschraenkung.php | 28 ++++++++++++++++ system/phrasesupdate.php | 20 ------------ 6 files changed, 34 insertions(+), 60 deletions(-) create mode 100644 system/dbupdate_3.4/63394_Variablenbeschraenkung.php diff --git a/application/controllers/api/frontend/v1/stv/Favorites.php b/application/controllers/api/frontend/v1/stv/Favorites.php index ca8b62da6..951eb01a4 100644 --- a/application/controllers/api/frontend/v1/stv/Favorites.php +++ b/application/controllers/api/frontend/v1/stv/Favorites.php @@ -60,17 +60,6 @@ class Favorites extends FHCAPI_Controller $favorites = $this->input->post('favorites'); - $removed = []; - while (strlen($favorites) > 64) { - $favObj = json_decode($favorites); - if (!$favObj->list) - break; - $removed[] = array_shift($favObj->list); - $favorites = json_encode($favObj); - } - if ($removed) - $this->addMeta('removed', $removed); - $result = $this->VariableModel->setVariable(getAuthUID(), 'stv_favorites', $favorites); $this->getDataOrTerminateWithError($result); diff --git a/public/js/components/Stv/Studentenverwaltung/Verband.js b/public/js/components/Stv/Studentenverwaltung/Verband.js index 9a34033ce..5281b3f0a 100644 --- a/public/js/components/Stv/Studentenverwaltung/Verband.js +++ b/public/js/components/Stv/Studentenverwaltung/Verband.js @@ -112,26 +112,14 @@ export default { return cp; }, - async filterFav() { + filterFav() { this.favorites.on = !this.favorites.on; this.$api .call(this.endpoint.favorites.set( JSON.stringify(this.favorites) - )) - .then(result => { - if (result.meta?.removed) { - this.favorites.list = this.favorites.list - .filter(fav => !result.meta.removed.includes(fav)); - const items = result.meta.removed.map( - rem => this.nodes.find( - node => node.data.link == rem - ).label - ).join(',\n'); - this.$fhcAlert.alertWarning(this.$p.t('stv/warn_removed_favs', { items })); - } - }); + )); }, - async markFav(key) { + markFav(key) { let index = this.favorites.list.indexOf(key.data.link + ''); if (index != -1) { @@ -143,19 +131,7 @@ export default { this.$api .call(this.endpoint.favorites.set( JSON.stringify(this.favorites) - )) - .then(result => { - if (result.meta?.removed) { - this.favorites.list = this.favorites.list - .filter(fav => !result.meta.removed.includes(fav)); - const items = "\n" + result.meta.removed.map( - rem => this.nodes.find( - node => node.data.link == rem - ).label - ).join(",\n"); - this.$fhcAlert.alertWarning(this.$p.t('stv/warn_removed_favs', { items })); - } - }); + )); }, unsetFavFocus(e) { if (e.target.dataset?.linkFavAdd !== undefined) { diff --git a/system/FHComplete-3.3.sql b/system/FHComplete-3.3.sql index 170066a1e..18c9c2c3d 100644 --- a/system/FHComplete-3.3.sql +++ b/system/FHComplete-3.3.sql @@ -9755,7 +9755,7 @@ COMMENT ON TABLE public.tbl_tag IS 'Orders and Company Tags'; CREATE TABLE public.tbl_variable ( name character varying(64) NOT NULL, uid character varying(32) NOT NULL, - wert character varying(64) + wert text ); diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index cf2f40ca8..39d51a829 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -77,6 +77,7 @@ require_once('dbupdate_3.4/55614_perm_verwaltetoe.php'); require_once('dbupdate_3.4/25999_C4_dashboard.php'); require_once('dbupdate_3.4/61730_Dashboard_Anpassungen.php'); require_once('dbupdate_3.4/40128_search.php'); +require_once('dbupdate_3.4/63394_Variablenbeschraenkung.php'); // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/dbupdate_3.4/63394_Variablenbeschraenkung.php b/system/dbupdate_3.4/63394_Variablenbeschraenkung.php new file mode 100644 index 000000000..f6a75b5ef --- /dev/null +++ b/system/dbupdate_3.4/63394_Variablenbeschraenkung.php @@ -0,0 +1,28 @@ +db_query(" + SELECT data_type + FROM information_schema.columns + WHERE table_schema = 'public' + AND table_name = 'tbl_variable' + AND column_name = 'wert'; +")) { + if ($db->db_num_rows($result) == 1) + { + $data_type = $db->db_fetch_row($result)[0]; + + if (strtolower($data_type) != 'text') + { + $qry = "ALTER TABLE public.tbl_variable + ALTER COLUMN wert + TYPE TEXT;"; + + if (!$db->db_query($qry)) + echo 'public.tbl_variable '.$db->db_last_error().'
'; + else + echo 'public.tbl_variable: Change type of "wert" to TEXT
'; + } + } +} diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 9916907be..e417e4b7b 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -38360,26 +38360,6 @@ array( ) ) ), - array( - 'app' => 'core', - 'category' => 'stv', - 'phrase' => 'warn_removed_favs', - 'insertvon' => 'system', - 'phrases' => array( - array( - 'sprache' => 'German', - 'text' => 'Zu viele Favoriten! Die folgenden Einträge wurden entfernt: {items}', - 'description' => '', - 'insertvon' => 'system' - ), - array( - 'sprache' => 'English', - 'text' => 'Too many favorites! The following entries were removed: {items}', - 'description' => '', - 'insertvon' => 'system' - ) - ) - ), array( 'app' => 'core', 'category' => 'stv', From c69877ed85eaf7efc840348b889377e6ec9de91f Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 22 Sep 2025 13:41:58 +0200 Subject: [PATCH 21/34] bug beim loeschen von einer notiz mit doc --- application/core/Notiz_Controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/core/Notiz_Controller.php b/application/core/Notiz_Controller.php index c2bb03267..cfc54d5f5 100644 --- a/application/core/Notiz_Controller.php +++ b/application/core/Notiz_Controller.php @@ -393,10 +393,10 @@ abstract class Notiz_Controller extends FHCAPI_Controller foreach ($result as $doc) { $res = $this->dmslib->removeAll($doc->dms_id); - if (isError($result)) + if (isError($res)) { $this->db->trans_rollback(); - $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL); + $this->terminateWithError(getError($res), self::ERROR_TYPE_GENERAL); } } From 5efad50b62e4c27d18dd608f66f0c0a17efbee8f Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 23 Sep 2025 08:31:00 +0200 Subject: [PATCH 22/34] added missing iframe component --- .../Cis/Cms/Content_types/Iframe_content.js | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 public/js/components/Cis/Cms/Content_types/Iframe_content.js diff --git a/public/js/components/Cis/Cms/Content_types/Iframe_content.js b/public/js/components/Cis/Cms/Content_types/Iframe_content.js new file mode 100644 index 000000000..568cfaf03 --- /dev/null +++ b/public/js/components/Cis/Cms/Content_types/Iframe_content.js @@ -0,0 +1,31 @@ +import { replaceRelativeLegacyLink } from "../../../../helpers/LegacyLinkReplaceHelper.js"; + +export default { + name: "iframe_content", + props: { + content: { type: String, required: true } + }, + computed: { + srcUrl() { + const parser = new DOMParser() + const doc = parser.parseFromString(`
${this.content}
`, "text/html"); + const iframe = doc.querySelector("iframe[src]"); + + if (!iframe) + return ""; + + let url = iframe.getAttribute("src") || ""; + return replaceRelativeLegacyLink(url); + } + }, + template: ` +
+ +
Keine URL gefunden.
+
+ ` +}; From 2ef2948a6e4bf2cbe32d547d18a5f7dacbf77397 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 25 Sep 2025 16:02:43 +0200 Subject: [PATCH 23/34] prevent strange effects when switching between content_types --- public/js/components/Cis/Cms/Content.js | 32 ++++--------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/public/js/components/Cis/Cms/Content.js b/public/js/components/Cis/Cms/Content.js index ec1bc8a76..355add08a 100644 --- a/public/js/components/Cis/Cms/Content.js +++ b/public/js/components/Cis/Cms/Content.js @@ -30,39 +30,19 @@ export default { }, data() { return { + content_type: null, content: null, content_id_internal: this.content_id }; }, methods: { fetchContent(){ - return this.$api + this.$api .call(ApiCms.content(this.content_id_internal, this.version, this.sprache, this.sichtbar)) .then(res => { - this.content = res.data.content; - this.content_type = res.data.type; - - document.querySelectorAll("#cms [data-confirm]").forEach((el) => { - el.addEventListener("click", (evt) => { - evt.preventDefault(); - BsConfirm.popup(el.dataset.confirm) - .then(() => { - Axios.get(el.href) - .then((res) => { - // TODO(chris): check for success then show message and/or reload - location = location; - }) - .catch((err) => console.error("ERROR:", err)); - }) - .catch(() => { - }); - }); - }); - document.querySelectorAll("#cms [data-href]").forEach((el) => { - el.href = el.dataset.href.replace( - /^ROOT\//, - FHC_JS_DATA_STORAGE_OBJECT.app_root - ); + this.$nextTick(function() { + this.content = res.data.content; + this.content_type = res.data.type; }); }); } @@ -96,8 +76,6 @@ export default { created() { this.fetchContent(); }, - mounted() { - }, template: /*html*/ `
From 58b942f0441aae268b784e7b3020b4e3f364f5eb Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 25 Sep 2025 16:14:09 +0200 Subject: [PATCH 24/34] fix typo in template_kurzbz --- system/dbupdate_3.4/63436_cis4_iframe_component.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/dbupdate_3.4/63436_cis4_iframe_component.php b/system/dbupdate_3.4/63436_cis4_iframe_component.php index abff4b7e1..a5b3bbf7c 100644 --- a/system/dbupdate_3.4/63436_cis4_iframe_component.php +++ b/system/dbupdate_3.4/63436_cis4_iframe_component.php @@ -57,7 +57,7 @@ $xslt_xhtml_c4= <<db_query("SELECT * FROM campus.tbl_template WHERE template_kurzbz='iframe2'")) +if ($result = @$db->db_query("SELECT * FROM campus.tbl_template WHERE template_kurzbz='iframe'")) { if ($db->db_num_rows($result) == 0) { @@ -78,4 +78,4 @@ EOD; } } -} \ No newline at end of file +} From 6047b19f4710cb941cdca0f9d31f5e6169fe7637 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 25 Sep 2025 17:19:19 +0200 Subject: [PATCH 25/34] do not show contacts with type hidden in cis4 profile --- application/libraries/ProfilLib.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/application/libraries/ProfilLib.php b/application/libraries/ProfilLib.php index 50b8bc264..6e93a0943 100644 --- a/application/libraries/ProfilLib.php +++ b/application/libraries/ProfilLib.php @@ -214,7 +214,7 @@ class ProfilLib{ * @param integer $uid the userID used to get the kontakt information * @return array all the kontakt information corresponding to a userID */ - private function getKontaktInfo($pid) + private function getKontaktInfo($pid, $includehidden=false) { $this->ci->load->model("person/Kontakt_model","KontaktModel"); $this->ci->KontaktModel->addSelect(['kontakttyp', 'kontakt_id', 'kontakt', 'tbl_kontakt.anmerkung', 'tbl_kontakt.zustellung']); @@ -222,7 +222,13 @@ class ProfilLib{ $this->ci->KontaktModel->addJoin('public.tbl_firma', 'firma_id', 'LEFT'); $this->ci->KontaktModel->addOrder('kontakttyp, kontakt, tbl_kontakt.updateamum, tbl_kontakt.insertamum'); - $kontakte_res = $this->ci->KontaktModel->loadWhere(['person_id' => $pid]); + $params = array('person_id' => $pid); + if(!$includehidden) + { + $params['kontakttyp <>'] = 'hidden'; + } + + $kontakte_res = $this->ci->KontaktModel->loadWhere($params); if(isError($kontakte_res)){ return error(getData($kontakte_res)); } From a021c8592022d6f86ccc29f1c56902c41c8b9927 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 25 Sep 2025 17:23:03 +0200 Subject: [PATCH 26/34] =?UTF-8?q?sch=C3=B6nere=20phrasen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/phrasesupdate.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 008ad8a8d..ceb265b14 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -30686,6 +30686,26 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'jetztStarten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Jetzt Starten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Start Now', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'anwesenheiten', 'category' => 'global', @@ -42556,6 +42576,26 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'abgabetool', + 'phrase' => 'c4abgabeStgSpezifischeRichtlinienBeachten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Bitte beachten Sie gegebenenfalls existierende studiengangsspezifische Richtlinien und informieren Sie sich diesbezüglich. Vielen Dank.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Please note any existing program-specific guidelines and inform yourself about them. Thank you.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'abgabetool', From 0df9cf769fd7a27528fe7b2534fce82dcb9f05e6 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Fri, 26 Sep 2025 14:33:20 +0200 Subject: [PATCH 27/34] strip data image base64 prefix before storing foto, show dummy profile img when foto is null in DetailsHeader --- .../controllers/api/frontend/v1/stv/Student.php | 15 ++++++++++----- public/js/components/DetailHeader/DetailHeader.js | 9 ++++++++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/application/controllers/api/frontend/v1/stv/Student.php b/application/controllers/api/frontend/v1/stv/Student.php index 90c12fe41..f2845572f 100644 --- a/application/controllers/api/frontend/v1/stv/Student.php +++ b/application/controllers/api/frontend/v1/stv/Student.php @@ -276,14 +276,19 @@ class Student extends FHCAPI_Controller $update_person = array(); foreach ($array_allowed_props_person as $prop) { $val = $this->input->post($prop); - if ($val !== null) + if ($val === null) + { + continue; + } + if($prop == 'foto') + { + $fotoval = ($val == '') ? null : str_replace('data:image/jpeg;base64,', '', $val); + $update_person[$prop] = $fotoval; + } + else { $update_person[$prop] = $val; } - if($prop == 'foto' && $val == '') - { - $update_person[$prop] = null; - } } $array_allowed_props_student = ['matrikelnr']; diff --git a/public/js/components/DetailHeader/DetailHeader.js b/public/js/components/DetailHeader/DetailHeader.js index 5c1573753..1088e3f63 100644 --- a/public/js/components/DetailHeader/DetailHeader.js +++ b/public/js/components/DetailHeader/DetailHeader.js @@ -102,6 +102,13 @@ export default { redirectToLeitung(){ this.$emit('redirectToLeitung', { person_id: this.leitungData.person_id}); + }, + getFotoSrc(foto) { + if(foto === null) { + return FHC_JS_DATA_STORAGE_OBJECT.app_root + 'skin/images/profilbild_dummy.jpg'; + } else { + return 'data:image/jpeg;base64,' + foto; + } } }, template: ` @@ -116,7 +123,7 @@ export default { Profilbild