From c0e2cec5568bfa01bee49a39bbb7a610483c5869 Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Wed, 14 Aug 2024 15:51:27 +0200 Subject: [PATCH 01/17] s&d --- application/libraries/AntragLib.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/application/libraries/AntragLib.php b/application/libraries/AntragLib.php index c1649587d..1a8b28ed3 100644 --- a/application/libraries/AntragLib.php +++ b/application/libraries/AntragLib.php @@ -77,7 +77,9 @@ class AntragLib 'studiensemester_kurzbz'=>$prestudentstatus->studiensemester_kurzbz, 'ausbildungssemester'=>$prestudentstatus->ausbildungssemester ], [ - 'statusgrund_id' => null + 'statusgrund_id' => null, + 'updateamum' => date('c'), + 'updatevon' => $insertvon ]); } } @@ -335,7 +337,10 @@ class AntragLib 'status_kurzbz'=>$prestudentstatus->status_kurzbz, 'studiensemester_kurzbz'=>$prestudentstatus->studiensemester_kurzbz, 'ausbildungssemester'=>$prestudentstatus->ausbildungssemester - ], []); + ], [ + 'updateamum' => $insertam, + 'updatevon' => $insertvon + ]); if (isError($result)) { $errors[] = getError($result); From b079d22e8db60db783aa5e39bad24fbd130f89a2 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 27 Jan 2025 09:37:02 +0100 Subject: [PATCH 02/17] - filter hinzugefuegt - db index hinzugefuegt - sqls optimiert - diplomand wird nun auch angezeigt --- system/phrasesupdate.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 746c24da3..2eb88bc9c 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -18288,6 +18288,26 @@ array( ) ) ), + array( + 'app' => 'international', + 'category' => 'international', + 'phrase' => 'studentstatus', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Studentstatus', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Student status', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'international', 'category' => 'international', @@ -19423,6 +19443,26 @@ array( ) ) ), + array( + 'app' => 'international', + 'category' => 'international', + 'phrase' => 'stgtodo', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'Nur offene Massnahmen', + 'text' => 'O', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'only open measures', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'international', 'category' => 'international', From 30c42458613abad589797bd85d86f5ffe797c535 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 27 Feb 2025 08:35:05 +0100 Subject: [PATCH 03/17] - international skills -> diplomasupp - notenuebernahme mail - student uebersicht ueberarbeitet - phrases angepasst --- rdf/diplomasupplement.xml.php | 52 +++++++++++++++++++++++++++++++++++ system/phrasesupdate.php | 36 ++++++++++++++++++------ 2 files changed, 80 insertions(+), 8 deletions(-) diff --git a/rdf/diplomasupplement.xml.php b/rdf/diplomasupplement.xml.php index 189aa0c05..41d046a99 100644 --- a/rdf/diplomasupplement.xml.php +++ b/rdf/diplomasupplement.xml.php @@ -386,6 +386,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") echo ' '.$titel_en.''; $praktikum = false; $auslandssemester = false; + $internationalskills = false; $qry = "SELECT projektarbeit_id FROM @@ -403,6 +404,56 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") } } + if ($row->typ === 'b') + { + //check if extension international skills is active + $qry = "SELECT 1 + FROM information_schema.tables + WHERE table_schema = 'extension' AND table_name = 'tbl_internat_massnahme'"; + + if($result = $db->db_query($qry)) + { + if ($db->db_num_rows($result) === 1) + { + $qry = "SELECT bezeichnung_mehrsprachig[1] as \"internationalskill_deutsch\", + bezeichnung_mehrsprachig[2] as \"internationalskill_english\" + FROM extension.tbl_internat_massnahme_zuordnung zuordnung + JOIN extension.tbl_internat_massnahme massnahme ON zuordnung.massnahme_id = massnahme.massnahme_id + JOIN extension.tbl_internat_massnahme_zuordnung_status zstatus ON zuordnung.massnahme_zuordnung_id = zstatus.massnahme_zuordnung_id + JOIN tbl_prestudent ON zuordnung.prestudent_id = tbl_prestudent.prestudent_id + JOIN tbl_student ON tbl_prestudent.prestudent_id = tbl_student.prestudent_id + WHERE zstatus.massnahme_status_kurzbz = 'confirmed' + AND tbl_student.student_uid = ".$db->db_add_param($uid_arr[$i])." + AND zstatus.massnahme_zuordnung_status_id = ( + SELECT MAX(sub_zstatus.massnahme_zuordnung_status_id) + FROM extension.tbl_internat_massnahme_zuordnung_status sub_zstatus + WHERE sub_zstatus.massnahme_zuordnung_id = zuordnung.massnahme_zuordnung_id + ) + GROUP BY zuordnung.massnahme_zuordnung_id, tbl_student.student_uid, tbl_prestudent.prestudent_id, tbl_prestudent.studiengang_kz, bezeichnung_mehrsprachig;"; + + if($db->db_query($qry)) + { + if($db->db_num_rows() > 0) + { + $internationalskills = true; + echo ""; + while($row1 = $db->db_fetch_object()) + { + echo ""; + echo "internationalskill_deutsch]]>"; + echo ""; + + echo ""; + echo "internationalskill_english]]>"; + echo ""; + } + echo ""; + } + } + } + } + } + $qry = "SELECT tbl_bisio.bisio_id, von, bis, lehreinheit_id, (SELECT STRING_AGG ( tbl_zweck.bezeichnung, @@ -461,6 +512,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") $abschlusspruefungsdatum = ''; $abschlussbeurteilung=''; $pruefungstyp_kurzbz=''; + $abschlussbeurteilung_deutsch = ''; if($db->db_query($qry)) { diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 2eb88bc9c..e6acc4854 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -19211,13 +19211,33 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Maßnahmen - geplant', + 'text' => 'Maßnahme - geplant', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Measures - planned', + 'text' => 'Measure - planned', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'international', + 'category' => 'international', + 'phrase' => 'geplanteMassnahmenDesc', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Die Maßhname wurde geplant.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'The measure was planned.', 'description' => '', 'insertvon' => 'system' ) @@ -19271,13 +19291,13 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Maßnahmen - durchgeführt', + 'text' => 'Maßnahme - durchgeführt', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Measures - performed', + 'text' => 'Measure - performed', 'description' => '', 'insertvon' => 'system' ) @@ -19311,13 +19331,13 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Maßnahmen - abgelehnt', + 'text' => 'Maßnahme - abgelehnt', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Measures - declined', + 'text' => 'Measure - declined', 'description' => '', 'insertvon' => 'system' ) @@ -19411,13 +19431,13 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Anmerkung - Studiengangsleitung', + 'text' => 'Begründung - Studiengangsleitung', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Note - Study course Director', + 'text' => 'Reason - Study course Director', 'description' => '', 'insertvon' => 'system' ) From fb2f8d5c530b38f63d0b16dbb6fe61272373571a Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Thu, 20 Mar 2025 14:41:28 +0100 Subject: [PATCH 04/17] added function for getting UHSTAT1 person data (centralizing...) --- .../models/codex/Uhstat1daten_model.php | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/application/models/codex/Uhstat1daten_model.php b/application/models/codex/Uhstat1daten_model.php index 9bca44b58..5bffb5c06 100644 --- a/application/models/codex/Uhstat1daten_model.php +++ b/application/models/codex/Uhstat1daten_model.php @@ -11,4 +11,42 @@ class Uhstat1daten_model extends DB_Model $this->dbTable = 'bis.tbl_uhstat1daten'; $this->pk = 'uhstat1daten_id'; } + + /** + * Gets person data needed for sending as UHSTAT1 data. + * @param array $person_id_arr + * @param string $studiensemester + * @param array $status_kurzbz + * @return object success with prestudents or error + */ + public function getUHSTAT1PersonData($person_id_arr) + { + $params = array($person_id_arr); + + $prstQry = "SELECT + DISTINCT ON (pers.person_id) + pers.person_id, uhstat_daten.uhstat1daten_id, pers.svnr, pers.ersatzkennzeichen, pers.geburtsnation, + uhstat_daten.mutter_geburtsstaat, uhstat_daten.mutter_bildungsstaat, uhstat_daten.mutter_geburtsjahr, + uhstat_daten.mutter_bildungmax, uhstat_daten.vater_geburtsstaat, uhstat_daten.vater_bildungsstaat, + uhstat_daten.vater_geburtsjahr, uhstat_daten.vater_bildungmax, + kzVbpkAs.inhalt AS \"vbpkAs\", kzVbpkBf.inhalt AS \"vbpkBf\" + FROM + public.tbl_person pers + JOIN public.tbl_prestudent ps USING (person_id) + JOIN public.tbl_studiengang stg USING (studiengang_kz) + JOIN bis.tbl_uhstat1daten uhstat_daten USING (person_id) + LEFT JOIN public.tbl_kennzeichen kzVbpkAs ON kzVbpkAs.kennzeichentyp_kurzbz = 'vbpkAs'AND kzVbpkAs.person_id = pers.person_id AND kzVbpkAs.aktiv + LEFT JOIN public.tbl_kennzeichen kzVbpkBf ON kzVbpkBf.kennzeichentyp_kurzbz = 'vbpkBf'AND kzVbpkBf.person_id = pers.person_id AND kzVbpkBf.aktiv + WHERE + ps.bismelden + AND stg.melderelevant + AND pers.person_id IN ? + ORDER BY + pers.person_id"; + + return $this->execReadOnlyQuery( + $prstQry, + $params + ); + } } From b4b2d8da49a4a4445634c5119cae83c89dafd723 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Sun, 30 Mar 2025 23:38:35 +0200 Subject: [PATCH 05/17] added UHSTAT issue resolvers, bugfix getuhstatdata: check for empty array --- .../controllers/jobs/IssueResolver.php | 4 +- .../issues/PlausicheckResolverLib.php | 5 ++- .../issues/resolvers/CORE_PERSON_0005.php | 36 ++++++++++++++++++ .../issues/resolvers/CORE_PERSON_0006.php | 37 +++++++++++++++++++ .../models/codex/Uhstat1daten_model.php | 2 + system/fehlerupdate.php | 16 ++++++++ 6 files changed, 97 insertions(+), 3 deletions(-) create mode 100644 application/libraries/issues/resolvers/CORE_PERSON_0005.php create mode 100644 application/libraries/issues/resolvers/CORE_PERSON_0006.php diff --git a/application/controllers/jobs/IssueResolver.php b/application/controllers/jobs/IssueResolver.php index ca07439c3..fe7ee21f5 100755 --- a/application/controllers/jobs/IssueResolver.php +++ b/application/controllers/jobs/IssueResolver.php @@ -48,7 +48,9 @@ class IssueResolver extends IssueResolver_Controller 'CORE_PERSON_0001' => 'CORE_PERSON_0001', 'CORE_PERSON_0002' => 'CORE_PERSON_0002', 'CORE_PERSON_0003' => 'CORE_PERSON_0003', - 'CORE_PERSON_0004' => 'CORE_PERSON_0004' + 'CORE_PERSON_0004' => 'CORE_PERSON_0004', + 'CORE_PERSON_0005' => 'CORE_PERSON_0005', + 'CORE_PERSON_0006' => 'CORE_PERSON_0006' ); // fehler which are resolved by the job the same way as they are produced diff --git a/application/libraries/issues/PlausicheckResolverLib.php b/application/libraries/issues/PlausicheckResolverLib.php index 26da985f6..2b20a7d93 100644 --- a/application/libraries/issues/PlausicheckResolverLib.php +++ b/application/libraries/issues/PlausicheckResolverLib.php @@ -13,7 +13,7 @@ class PlausicheckResolverLib private $_ci; // ci instance private $_extensionName; // name of extension private $_codeLibMappings = []; // mappings for issues which explicitly defined resolver - private $_codeProducerLibMappings = []; // mappings for issues which are resolved as produced + private $_codeProducerLibMappings = []; // mappings for issues which are resolved with the same check as they are produced public function __construct($params = null) { @@ -99,10 +99,11 @@ class PlausicheckResolverLib $issueResolved = getData($issueResolvedRes) === true; } } - elseif (isset($this->_codeProducerLibMappings[$issue->fehlercode])) + elseif (isset($this->_codeProducerLibMappings[$issue->fehlercode])) // check if it is an issue without explicit resolver, "self-resolving" { $libName = $this->_codeProducerLibMappings[$issue->fehlercode]; + // execute same check as used for issue production $issueResolvedRes = $this->_ci->plausicheckproducerlib->producePlausicheckIssue( $libName, $issue->fehler_kurzbz, diff --git a/application/libraries/issues/resolvers/CORE_PERSON_0005.php b/application/libraries/issues/resolvers/CORE_PERSON_0005.php new file mode 100644 index 000000000..1d768e70c --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_PERSON_0005.php @@ -0,0 +1,36 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->model('person/Person_model', 'PersonModel'); + + // load geburtsnation for the given person + $this->_ci->PersonModel->addSelect('geburtsnation'); + $personRes = $this->_ci->PersonModel->load($params['issue_person_id']); + + if (isError($personRes)) return $personRes; + + if (hasData($personRes)) + { + // get person data + $personData = getData($personRes)[0]; + + // if geburtsnation present, issue is resolved + return success(!isEmptyString($personData->geburtsnation)); + } + else + return success(false); // if no person found, not resolved + } +} \ No newline at end of file diff --git a/application/libraries/issues/resolvers/CORE_PERSON_0006.php b/application/libraries/issues/resolvers/CORE_PERSON_0006.php new file mode 100644 index 000000000..8b7ff9c56 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_PERSON_0006.php @@ -0,0 +1,37 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->model('codex/Uhstat1daten_model', 'UhstatModel'); + + $personRes = $this->_ci->UhstatModel->getUHSTAT1PersonData([$params['issue_person_id']]); + + if (isError($personRes)) return $personRes; + + if (hasData($personRes)) + { + // get person data + $personData = getData($personRes)[0]; + + // if person identification data present, issue is resolved + return success( + !isEmptyString($personData->ersatzkennzeichen) + || (!isEmptyString($personData->vbpkAs) && !isEmptyString($personData->vbpkBf)) + ); + } + else + return success(false); // if no person found, not resolved + } +} \ No newline at end of file diff --git a/application/models/codex/Uhstat1daten_model.php b/application/models/codex/Uhstat1daten_model.php index 5bffb5c06..899f037ef 100644 --- a/application/models/codex/Uhstat1daten_model.php +++ b/application/models/codex/Uhstat1daten_model.php @@ -21,6 +21,8 @@ class Uhstat1daten_model extends DB_Model */ public function getUHSTAT1PersonData($person_id_arr) { + if (!isset($person_id_arr) || isEmptyArray($person_id_arr)) return success([]); + $params = array($person_id_arr); $prstQry = "SELECT diff --git a/system/fehlerupdate.php b/system/fehlerupdate.php index 89446982d..3e0cf8b8b 100644 --- a/system/fehlerupdate.php +++ b/system/fehlerupdate.php @@ -324,6 +324,22 @@ $fehlerArr = array( 'fehlertext' => 'Es sind mehrere oder keine Zustelladressen eingetragen', 'fehlertyp_kurzbz' => 'error', 'app' => 'core' + ), + array( + 'fehlercode' => 'CORE_PERSON_0005', + 'fehler_kurzbz' => 'geburtsnationFehlt', + 'fehlercode_extern' => null, + 'fehlertext' => 'Geburtsnation nicht vorhanden', + 'fehlertyp_kurzbz' => 'error', + 'app' => 'core' + ), + array( + 'fehlercode' => 'CORE_PERSON_0006', + 'fehler_kurzbz' => 'uhstatPersonkennungFehlt', + 'fehlercode_extern' => null, + 'fehlertext' => 'Personkennung fehlt (vBpk AS, vBpk BF oder Ersatzkennzeichen fehlt)', + 'fehlertyp_kurzbz' => 'error', + 'app' => 'core' ) /** Plausichecks end **/ ); From bcc712e9006f5b658318bb0e241c899b562a50b1 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 9 Apr 2025 14:27:37 +0200 Subject: [PATCH 06/17] addfaktor beim hinzuefuegen einer lv entfernt --- vilesci/lehre/lehrveranstaltung_details.php | 27 --------------------- 1 file changed, 27 deletions(-) diff --git a/vilesci/lehre/lehrveranstaltung_details.php b/vilesci/lehre/lehrveranstaltung_details.php index 60f2fc3c9..bad2a7d93 100644 --- a/vilesci/lehre/lehrveranstaltung_details.php +++ b/vilesci/lehre/lehrveranstaltung_details.php @@ -30,8 +30,6 @@ require_once('../../include/lehrmodus.class.php'); require_once('../../include/benutzerberechtigung.class.php'); require_once('../../include/studienplan.class.php'); - require_once('../../include/lehrveranstaltung_faktor.class.php'); - require_once('../../include/studiensemester.class.php'); if (!$db = new basis_db()) die('Es konnte keine Verbindung zum Server aufgebaut werden.'); @@ -141,31 +139,6 @@ $reloadstr .= " window.location.href='".$_SERVER['PHP_SELF']."?stg_kz=$lv->studiengang_kz&semester=$lv->semester&neu=true';"; } $reloadstr .= "\n"; - - if (in_array($lv->lehrtyp_kurzbz, array('tpl', 'lv')) && $lv->new === true) - { - $lv_faktor = new lehrveranstaltung_faktor(); - $studiensemester = new studiensemester(); - $studiensemester_von = $studiensemester->getLastOrAktSemester(); - if ($lv->lehrtyp_kurzbz === 'lv' && $_POST['lehrveranstaltung_template_id'] !== '') - { - - $lv_faktor->getAkt($_POST['lehrveranstaltung_template_id']); - //TODO Faktor in eine Config - if (is_null($lv_faktor->faktor)) - $lv_faktor->addFaktor($lv->lehrveranstaltung_id, 2, $studiensemester_von); - else - $lv_faktor->addFaktor($lv->lehrveranstaltung_id, $lv_faktor->faktor, $studiensemester_von); - } - else - { - $lv_faktor->loadByLV($lv->lehrveranstaltung_id); - if (empty($lv_faktor->lv_faktoren)) - { - $lv_faktor->addFaktor($lv->lehrveranstaltung_id, 2, $studiensemester_von); - } - } - } } } From 1888c51a483b4d28c2b6bd37caf4f8172a66be74 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 15 Apr 2025 11:09:59 +0200 Subject: [PATCH 07/17] master gemerged phrase bugfix --- system/phrasesupdate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 5185c6810..1afe4a196 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -19610,8 +19610,8 @@ array( 'insertvon' => 'system', 'phrases' => array( array( - 'sprache' => 'Nur offene Massnahmen', - 'text' => 'O', + 'sprache' => 'German', + 'text' => 'Nur offene Massnahmen', 'description' => '', 'insertvon' => 'system' ), From ac5e95e6b9941707641e7b2367d576446d1a8810 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 17 Apr 2025 08:20:30 +0200 Subject: [PATCH 08/17] dbchanges: add columns lvexport and lvexport_sum to hr.tbl_gehalstyp, add gehaltstyp zulage_allin, set zulage_allin for gbs attached to vbs freitext allin --- system/dbupdate_3.4.php | 2 +- system/dbupdate_3.4/28260_vertraege.php | 110 ++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 1 deletion(-) diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index b6712840b..0e2b4e7c6 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -213,7 +213,7 @@ $tabellen=array( "hr.tbl_teilzeittyp" => array("teilzeittyp_kurzbz","bezeichnung","aktiv"), "hr.tbl_gehaltsbestandteil" => array("gehaltsbestandteil_id","dienstverhaeltnis_id","vertragsbestandteil_id","gehaltstyp_kurzbz","von","bis","anmerkung","grundbetrag","betrag_valorisiert","valorisierungssperre","insertamum", "insertvon","updateamum","updatevon","valorisierung","auszahlungen"), "hr.tbl_gehaltshistorie" => array("gehaltshistorie_id", "datum","betrag","gehaltsbestandteil_id","mitarbeiter_uid","gehaltsbestandteil_von","gehaltsbestandteil_bis"), - "hr.tbl_gehaltstyp" => array("gehaltstyp_kurzbz","bezeichnung","valorisierung","sort","aktiv"), + "hr.tbl_gehaltstyp" => array("gehaltstyp_kurzbz","bezeichnung","valorisierung","sort","aktiv","lvexport","lvexport_sum"), "hr.tbl_frist" => array("frist_id","mitarbeiter_uid","ereignis_kurzbz","bezeichnung","datum","status_kurzbz","parameter","insertvon","insertamum","updatevon","updateamum"), "hr.tbl_frist_ereignis" => array("ereignis_kurzbz","bezeichnung","manuell","sort"), "hr.tbl_frist_status" => array("status_kurzbz", "bezeichnung","sort"), diff --git a/system/dbupdate_3.4/28260_vertraege.php b/system/dbupdate_3.4/28260_vertraege.php index 073b53c18..22c5fdf44 100644 --- a/system/dbupdate_3.4/28260_vertraege.php +++ b/system/dbupdate_3.4/28260_vertraege.php @@ -622,4 +622,114 @@ if ($result = $db->db_query("SELECT * FROM information_schema.columns WHERE colu else echo 'Spalte betrag wurde in hr.tbl_sachaufwand neu erstellt
'; } +} + +if ($result = $db->db_query("SELECT * FROM information_schema.columns WHERE column_name='lvexport' AND table_name='tbl_gehaltstyp' AND table_schema='hr'")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = " + ALTER TABLE + hr.tbl_gehaltstyp + ADD COLUMN + lvexport boolean NOT NULL DEFAULT true; + "; + if (! $db->db_query($qry)) + echo 'Vertraege: ' . $db->db_last_error() . '
'; + else + echo 'Spalte lvexport wurde in hr.tbl_gehaltstyp neu erstellt
'; + + $qryatz = " + UPDATE + hr.tbl_gehaltstyp + SET + lvexport = false + WHERE + gehaltstyp_kurzbz = 'lohnausgleichatz'; + "; + if (! $db->db_query($qryatz)) + echo 'Vertraege: ' . $db->db_last_error() . '
'; + else + echo 'Spalte lvexport wurde in hr.tbl_gehaltstyp fuer gehaltstyp lohnausgleichatz auf false gesetzt
'; + } +} + +if ($result = $db->db_query("SELECT * FROM information_schema.columns WHERE column_name='lvexport_sum' AND table_name='tbl_gehaltstyp' AND table_schema='hr'")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = " + ALTER TABLE + hr.tbl_gehaltstyp + ADD COLUMN + lvexport_sum VARCHAR(255) default null; + "; + if (! $db->db_query($qry)) + echo 'Vertraege: ' . $db->db_last_error() . '
'; + else + echo 'Spalte lvexport_sum wurde in hr.tbl_gehaltstyp neu erstellt
'; + + $qrysortorder = " + UPDATE + hr.tbl_gehaltstyp + SET + sort = sort + 1 + WHERE + sort > 3; + "; + if (! $db->db_query($qrysortorder)) + echo 'Vertraege: ' . $db->db_last_error() . '
'; + else + echo 'Spalte sort wurde in hr.tbl_gehaltstyp fuer sort > 3 erhoeht
'; + + $qryzulageallin = " + INSERT INTO + hr.tbl_gehaltstyp + (gehaltstyp_kurzbz, bezeichnung, valorisierung, sort,aktiv, lvexport) + VALUES + ('zulage_allin', 'Zulage (Allin)', true, 4, true, true); + "; + if (! $db->db_query($qryzulageallin)) + echo 'Vertraege: ' . $db->db_last_error() . '
'; + else + echo 'gehaltstyp zulage_allin wurde in hr.tbl_gehaltstyp hinzugefuegt
'; + + $qrysetsum = " + UPDATE + hr.tbl_gehaltstyp + SET + lvexport_sum = 'GRUNDGEHALT' + WHERE + gehaltstyp_kurzbz IN ('grundgehalt', 'zulage_allin'); + "; + if (! $db->db_query($qrysetsum)) + echo 'Vertraege: ' . $db->db_last_error() . '
'; + else + echo 'Spalte lvexprt_sum wurde in hr.tbl_gehaltstyp fuer grundgehalt ' + . 'und zulage_allin auf GRUNDGEHALT gesetzt
'; + + $qrysetzulageallin = " + WITH gbsallin AS ( + SELECT + * + FROM + hr.tbl_gehaltsbestandteil g + JOIN + hr.tbl_vertragsbestandteil_freitext f ON g.vertragsbestandteil_id = f.vertragsbestandteil_id + WHERE + f.freitexttyp_kurzbz = 'allin' + ) + UPDATE + hr.tbl_gehaltsbestandteil + SET + gehaltstyp_kurzbz = 'zulage_allin' + WHERE + gehaltsbestandteil_id IN (SELECT gehaltsbestandteil_id FROM gbsallin); + "; + if (! $db->db_query($qrysetzulageallin)) + echo 'Vertraege: ' . $db->db_last_error() . '
'; + else + echo 'gehaltstyp_kurzbz wurde bei gehaltsbestandteilen an allin ' + . 'freitext vertragsbestandteilen auf zulage_allin gesetzt
'; + } } \ No newline at end of file From d4012232ab6233139a35fe9d4c2a990233dc3d76 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 17 Apr 2025 11:01:33 +0200 Subject: [PATCH 09/17] ausbildungssemester hinzugefuegt --- .../views/system/infocenter/infocenterFreigegebenData.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index 27738719c..38285b6ae 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -112,7 +112,7 @@ $query = ' LIMIT 1 ) AS "AnzahlAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz || \' [\' || pss.ausbildungssemester || \']\'), \', \') FROM public.tbl_prestudentstatus pss JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_studiengang sg USING(studiengang_kz) From 7b30869f7cda6f677fd71bd63ca9e05cd72eecb5 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 17 Apr 2025 18:28:26 +0200 Subject: [PATCH 10/17] make where clause more precise --- system/dbupdate_3.4/28260_vertraege.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system/dbupdate_3.4/28260_vertraege.php b/system/dbupdate_3.4/28260_vertraege.php index 22c5fdf44..1e0e4e048 100644 --- a/system/dbupdate_3.4/28260_vertraege.php +++ b/system/dbupdate_3.4/28260_vertraege.php @@ -718,6 +718,8 @@ if ($result = $db->db_query("SELECT * FROM information_schema.columns WHERE colu hr.tbl_vertragsbestandteil_freitext f ON g.vertragsbestandteil_id = f.vertragsbestandteil_id WHERE f.freitexttyp_kurzbz = 'allin' + AND + g.gehaltstyp_kurzbz <> 'zulage_allin' ) UPDATE hr.tbl_gehaltsbestandteil From 34eb2ab80ce87923c4a50020a900b7d1dd08546e Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Tue, 22 Apr 2025 11:11:46 +0200 Subject: [PATCH 11/17] check permission system_change_outputformat in final exam on degree program oe_kurzbz --- .../Details/Abschlusspruefung/Abschlusspruefung.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Abschlusspruefung/Abschlusspruefung.js b/public/js/components/Stv/Studentenverwaltung/Details/Abschlusspruefung/Abschlusspruefung.js index 31f600a8c..76987aefc 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Abschlusspruefung/Abschlusspruefung.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Abschlusspruefung/Abschlusspruefung.js @@ -52,6 +52,15 @@ export default { stg_kz(){ return this.studentKzs[0]; }, + showAllFormats() { + if( this.isBerechtigtDocAndOdt === false + || !Array.isArray(this.isBerechtigtDocAndOdt) ) + { + return false; + } + let retval = this.isBerechtigtDocAndOdt.includes(this.stgInfo.oe_kurzbz); + return retval; + } }, props: { student: Object @@ -478,7 +487,7 @@ export default {
Date: Thu, 24 Apr 2025 10:52:47 +0200 Subject: [PATCH 12/17] change order by to ensure latest dv is sorted first --- .../models/vertragsbestandteil/Dienstverhaeltnis_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php b/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php index 6827beaa4..94b0c75eb 100644 --- a/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php +++ b/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php @@ -59,7 +59,7 @@ class Dienstverhaeltnis_model extends DB_Model } $qry .=" - ORDER BY dv.von desc + ORDER BY COALESCE(dv.bis, '2999-12-31'::date) DESC, dv.von DESC "; return $this->execQuery($qry, $data); From 9410388a7a326932efc1ad4b15ff80dccb45fbc0 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 24 Apr 2025 15:40:58 +0200 Subject: [PATCH 13/17] tune order by to sort nearest active dv first --- .../vertragsbestandteil/Dienstverhaeltnis_model.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php b/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php index 94b0c75eb..f81a2d518 100644 --- a/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php +++ b/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php @@ -59,7 +59,14 @@ class Dienstverhaeltnis_model extends DB_Model } $qry .=" - ORDER BY COALESCE(dv.bis, '2999-12-31'::date) DESC, dv.von DESC + ORDER BY + CASE + WHEN (COALESCE(dv.bis, '2999-12-31'::date) - NOW()::date) < 0 THEN NULL + ELSE + (COALESCE(dv.bis, '2999-12-31'::date) - NOW()::date) + END ASC NULLS LAST, + COALESCE(dv.bis, '2999-12-31'::date) DESC, + dv.von DESC "; return $this->execQuery($qry, $data); From 24b19a1d8b83504f86f723190bd13378d1602171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Wed, 30 Apr 2025 10:33:37 +0200 Subject: [PATCH 14/17] =?UTF-8?q?Workaround=20f=C3=BCr=20Bug=20in=20Firefo?= =?UTF-8?q?x=20ab=20Version=20137=20wodruch=20der=20Weiter=20Button=20nich?= =?UTF-8?q?t=20immer=20ganz=20angezeigt=20wird?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/testtool/frage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cis/testtool/frage.php b/cis/testtool/frage.php index 0aa37b299..c38229cdf 100644 --- a/cis/testtool/frage.php +++ b/cis/testtool/frage.php @@ -148,7 +148,7 @@ echo ' alert(t("testtool/alleFragenBeantwortet")."'"?>); return true; } - + $(document).ready(function () { $(document).bind('cut copy paste', function(e) { @@ -717,7 +717,7 @@ if($frage->frage_id!='') if(!$demo) { - echo ''; + echo ''; } else { From 4bceddcc82f64dc2198aa4994fc49f955ac63cf0 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Fri, 9 May 2025 13:58:14 +0200 Subject: [PATCH 15/17] add systemerror_mailto ci config, render systemerror_mailto to FHC_JS_DATA_STORAGE_OBJECT, use FHC_JS_DATA_STORAGE_OBJECT.systemerror_mailto in FhcAlert Plugins --- application/config/javascript.php | 4 +++- application/helpers/hlp_header_helper.php | 4 ++++ public/js/plugin/FhcAlert.js | 8 +++++++- public/js/plugins/FhcAlert.js | 8 +++++++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/application/config/javascript.php b/application/config/javascript.php index 5e9aa270a..f3237fde3 100644 --- a/application/config/javascript.php +++ b/application/config/javascript.php @@ -4,4 +4,6 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); // use vuejs dev version $config['use_vuejs_dev_version'] = false; // use bundled javascript -$config['use_bundled_javascript'] = false; \ No newline at end of file +$config['use_bundled_javascript'] = false; +// systemerror_mailto use in FHC-Alert Plugin - if empty Link will not be rendered +$config['systemerror_mailto'] = ''; \ No newline at end of file diff --git a/application/helpers/hlp_header_helper.php b/application/helpers/hlp_header_helper.php index 14f7ed338..de7e866f4 100644 --- a/application/helpers/hlp_header_helper.php +++ b/application/helpers/hlp_header_helper.php @@ -95,6 +95,9 @@ function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod) }, $server_language); $user_language = getUserLanguage(); + $ci->load->config('javascript'); + $systemerror_mailto = $ci->config->item('systemerror_mailto'); + $FHC_JS_DATA_STORAGE_OBJECT = array( 'app_root' => APP_ROOT, 'ci_router' => $indexPage, @@ -103,6 +106,7 @@ function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod) 'server_languages' => $server_language, 'user_language' => $user_language, 'timezone' => date_default_timezone_get(), + 'systemerror_mailto' => $systemerror_mailto, ); $toPrint = "\n"; diff --git a/public/js/plugin/FhcAlert.js b/public/js/plugin/FhcAlert.js index be8d08b81..f32f18d63 100644 --- a/public/js/plugin/FhcAlert.js +++ b/public/js/plugin/FhcAlert.js @@ -117,7 +117,7 @@ const helperApp = Vue.createApp({ }, methods: { mailToUrl(slotProps) { - let mailTo = 'noreply@technikum-wien.at'; // TODO domain anpassen + let mailTo = FHC_JS_DATA_STORAGE_OBJECT.systemerror_mailto; let subject = 'Meldung%20Systemfehler'; let body = ` Danke, dass Sie uns den Fehler melden. %0D%0A %0D%0A @@ -141,6 +141,11 @@ const helperApp = Vue.createApp({ unmounted() { helperAppContainer.parentElement.removeChild(helperAppContainer); }, + computed: { + showmaillink: function() { + return FHC_JS_DATA_STORAGE_OBJECT.systemerror_mailto !== ''; + } + }, template: ` @@ -162,6 +167,7 @@ const helperApp = Vue.createApp({ Fehler anzeigen @@ -154,6 +159,7 @@ const helperApp = Vue.createApp({ Fehler anzeigen Date: Wed, 14 May 2025 08:33:25 +0200 Subject: [PATCH 16/17] null werte abgefangen --- .../api/frontend/v1/stv/Kontakt.php | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/application/controllers/api/frontend/v1/stv/Kontakt.php b/application/controllers/api/frontend/v1/stv/Kontakt.php index fd16fff06..bcd38853c 100644 --- a/application/controllers/api/frontend/v1/stv/Kontakt.php +++ b/application/controllers/api/frontend/v1/stv/Kontakt.php @@ -85,7 +85,10 @@ class Kontakt extends FHCAPI_Controller || $this->router->method == 'addNewBankverbindung' ) { $person_id = current(array_slice($this->uri->rsegments, 2)); - + + if (is_null($person_id) || !ctype_digit((string)$person_id)) + $this->terminateWithError( $this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL); + $this->checkPermissionsForPerson($person_id, $permsMa, $permsStud); } elseif ($this->router->method == 'loadAddress' || $this->router->method == 'loadContact' @@ -119,6 +122,9 @@ class Kontakt extends FHCAPI_Controller $model = 'person/Bankverbindung_model'; } + if (!isset($id) || !ctype_digit((string)$id)) + $this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL); + $this->load->model($model, 'TempModel'); $result = $this->TempModel->load($id); $data = $this->getDataOrTerminateWithError($result); @@ -387,8 +393,11 @@ class Kontakt extends FHCAPI_Controller $this->terminateWithSuccess(getData($result) ?: []); } - public function getFirmen($searchString) + public function getFirmen($searchString = null) { + if (is_null($searchString)) + $this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL); + $this->load->model('ressource/firma_model', 'FirmaModel'); $result = $this->FirmaModel->searchFirmen($searchString); @@ -398,8 +407,11 @@ class Kontakt extends FHCAPI_Controller $this->terminateWithSuccess($result ?: []); } - public function getStandorte($searchString) + public function getStandorte($searchString = null) { + if (is_null($searchString)) + $this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL); + $this->load->model('organisation/standort_model', 'StandortModel'); $result = $this->StandortModel->searchStandorte($searchString); @@ -409,8 +421,11 @@ class Kontakt extends FHCAPI_Controller $this->terminateWithSuccess($data); } - public function getStandorteByFirma($firma_id) + public function getStandorteByFirma($firma_id = null) { + if (is_null($firma_id) || !ctype_digit((string)$firma_id)) + $this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL); + $this->load->model('organisation/standort_model', 'StandortModel'); $result = $this->StandortModel->getStandorteByFirma($firma_id); @@ -652,6 +667,9 @@ class Kontakt extends FHCAPI_Controller $bic = $this->input->post('bic'); $blz = $this->input->post('blz'); $kontonr = $this->input->post('kontonr'); + $iban = $this->input->post('iban'); + $typ = $this->input->post('typ'); + $verrechnung = $this->input->post('verrechnung'); $result = $this->BankverbindungModel->insert( [ @@ -659,13 +677,13 @@ class Kontakt extends FHCAPI_Controller 'name' => $name, 'anschrift' => $anschrift, 'bic' => $bic, - 'iban' => $_POST['iban'], + 'iban' => $iban, 'blz' => $blz, 'kontonr' => $kontonr, 'insertvon' => 'uid', 'insertamum' => date('c'), - 'typ' => $_POST['typ'], - 'verrechnung' => $_POST['verrechnung'], + 'typ' => $typ, + 'verrechnung' => $verrechnung, 'ext_id' => $ext_id, 'oe_kurzbz' => $oe_kurzbz, 'orgform_kurzbz' => $orgform_kurzbz From 2db7f812abc579bbfb2f585982e11d1011f888d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Tue, 20 May 2025 11:31:28 +0200 Subject: [PATCH 17/17] Fehlerkurzbz korrigiert --- system/fehlerupdate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/fehlerupdate.php b/system/fehlerupdate.php index 3e0cf8b8b..68ce2e2cb 100644 --- a/system/fehlerupdate.php +++ b/system/fehlerupdate.php @@ -335,7 +335,7 @@ $fehlerArr = array( ), array( 'fehlercode' => 'CORE_PERSON_0006', - 'fehler_kurzbz' => 'uhstatPersonkennungFehlt', + 'fehler_kurzbz' => 'uhstatPersonkennungFehltCore', 'fehlercode_extern' => null, 'fehlertext' => 'Personkennung fehlt (vBpk AS, vBpk BF oder Ersatzkennzeichen fehlt)', 'fehlertyp_kurzbz' => 'error',