From a0dce925d43f687db814a611561edc5ae562a2b8 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 14 Jan 2025 10:56:28 +0100 Subject: [PATCH 01/10] =?UTF-8?q?-=20rt=20holt=20sich=20zus=C3=A4tzlich=20?= =?UTF-8?q?alle=20gebiete=20aus=20den=20semestern=20davor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/testtool/login.php | 1 + cis/testtool/menu.php | 48 ++++++--- include/gebiet_pruefling.class.php | 97 +++++++++++++++++++ system/dbupdate_3.4.php | 2 + ...eihungstest_ablauf_fuer_quereinsteiger.php | 39 ++++++++ 5 files changed, 172 insertions(+), 15 deletions(-) create mode 100644 include/gebiet_pruefling.class.php create mode 100644 system/dbupdate_3.4/54225_reihungstest_ablauf_fuer_quereinsteiger.php diff --git a/cis/testtool/login.php b/cis/testtool/login.php index d1944fe7a..2bd4601db 100644 --- a/cis/testtool/login.php +++ b/cis/testtool/login.php @@ -604,6 +604,7 @@ elseif (isset($prestudent_id)) $ps_obj->lastStatus = $ps_tmp->status_kurzbz; // letzten Status dem result array hinzufügen $ps_obj->status_mehrsprachig = $ps_tmp->status_mehrsprachig; + $ps_obj->ausbildungssemester = $ps_tmp->ausbildungssemester; } // Falls Status 'Abgewiesene' vorhanden, nach hinten reihen diff --git a/cis/testtool/menu.php b/cis/testtool/menu.php index 7c8b12b9d..42ab8f8d3 100644 --- a/cis/testtool/menu.php +++ b/cis/testtool/menu.php @@ -29,6 +29,7 @@ require_once('../../include/sprache.class.php'); require_once '../../include/phrasen.class.php'; require_once '../../include/studiengang.class.php'; require_once('../../include/gebiet.class.php'); +require_once('../../include/gebiet_pruefling.class.php'); if (!$db = new basis_db()) die('Fehler beim Oeffnen der Datenbankverbindung'); @@ -193,8 +194,8 @@ if (isset($_SESSION['pruefling_id'])) ) - SELECT DISTINCT ON - (gebiet_id, semester, reihung) + SELECT * FROM (SELECT DISTINCT ON + (gebiet_id) semester, gebiet_id, STRING_AGG(studiengang_kz::TEXT, ', ' ORDER BY studiengang_kz) AS studiengang_kz_list, @@ -221,13 +222,7 @@ if (isset($_SESSION['pruefling_id'])) JOIN testtool.tbl_gebiet USING (gebiet_id) WHERE - ( - (prestudent_data.semester= 1 AND tbl_ablauf.semester = 1) - OR - (prestudent_data.semester= 2 AND tbl_ablauf.semester = 2) - OR - (prestudent_data.semester= 3 AND tbl_ablauf.semester IN (1,3)) - ) + tbl_ablauf.semester <= prestudent_data.semester AND ( prestudent_data.studienplan_id = tbl_ablauf.studienplan_id OR @@ -254,9 +249,7 @@ if (isset($_SESSION['pruefling_id'])) JOIN testtool.tbl_gebiet USING (gebiet_id) WHERE - (prestudent_data.semester= 1 AND tbl_ablauf.semester = 1) - OR - (prestudent_data.semester= 3 AND tbl_ablauf.semester IN (1,3)) + tbl_ablauf.semester <= prestudent_data.semester ) ) temp ) temp2 @@ -265,7 +258,7 @@ if (isset($_SESSION['pruefling_id'])) semester, gebiet_id, bezeichnung, - ". $bezeichnung_mehrsprachig_sel ." + ". $bezeichnung_mehrsprachig_sel ." ) temp3 ORDER BY semester, @@ -278,6 +271,8 @@ if (isset($_SESSION['pruefling_id'])) $lastsemester = ''; $quereinsteiger_stg = ''; $_SESSION['alleGebiete']= []; + $gebiet_pruefling = new gebiet_pruefling(); + $quereinsteiger_menu = false; while($row = $db->db_fetch_object($result)) { //Jedes Semester in einer eigenen Tabelle anzeigen @@ -289,8 +284,25 @@ if (isset($_SESSION['pruefling_id'])) } $lastsemester = $row->semester; - echo ''; - echo ''; + if ($row->semester == '1') + { + // Basisgebiete anzeigen + echo '
'. ($row->semester == '1' ? $p->t('testtool/basisgebiete') : $p->t('testtool/quereinstiegsgebiete')).'
'; + echo ''; + } + else + { + if (!$quereinsteiger_menu) + { + echo '
' . $p->t('testtool/basisgebiete') . '
'; + echo ''; + $quereinsteiger_menu = true; + } + else + { + echo '
' . $p->t('testtool/quereinstiegsgebiete') . '
'; + } + } } // Bei Quereinstiegsgebieten nach STG clustern und die STG anzeigen @@ -386,6 +398,12 @@ if (isset($_SESSION['pruefling_id'])) '; + if (!$gebiet_pruefling->checkIfExists($_SESSION['pruefling_id'], $row->gebiet_id)) + { + $gebiet_pruefling->pruefling_id = $_SESSION['pruefling_id']; + $gebiet_pruefling->gebiet_id = $row->gebiet_id; + $gebiet_pruefling->saveGebietForPruefling(); + } $_SESSION['alleGebiete'][] = $row->gebiet_id; } else diff --git a/include/gebiet_pruefling.class.php b/include/gebiet_pruefling.class.php new file mode 100644 index 000000000..9578bb546 --- /dev/null +++ b/include/gebiet_pruefling.class.php @@ -0,0 +1,97 @@ +db_add_param($pruefling_id, FHC_INTEGER); + + if($this->db_query($qry)) + { + if($row = $this->db_fetch_object()) + { + $this->prueflinggebiet_id = $row->prueflinggebiet_id; + $this->pruefling_id = $row->pruefling_id; + $this->gebiet_id = $row->gebiet_id; + return true; + } + else + { + $this->errormsg = "Pruefling nicht gefunden"; + return false; + } + } + else + { + $this->errormsg = "Fehler beim Laden der Gebiete für den Pruefling"; + return false; + } + } + + public function checkIfExists($pruefling_id, $gebiet_id) + { + $qry = "SELECT 1 + FROM testtool.tbl_pruefling_gebiet + WHERE pruefling_id =".$this->db_add_param($pruefling_id, FHC_INTEGER) ." AND gebiet_id =".$this->db_add_param($gebiet_id, FHC_INTEGER); + + if ($result = $this->db_query($qry)) + { + if ($this->db_num_rows($result) > 0) + return true; + else + return false; + } + } + + public function saveGebietForPruefling() + { + $qry = "INSERT INTO testtool.tbl_pruefling_gebiet + (pruefling_id, gebiet_id) + VALUES(". + $this->db_add_param($this->pruefling_id, FHC_INTEGER).','. + $this->db_add_param($this->gebiet_id, FHC_INTEGER).');'; + + if ($this->db_query($qry)) + { + return true; + } + else + { + $this->errormsg = 'Fehler beim Speichern der Daten'; + return true; + } + } + +} +?> diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index 0af314c46..75bb58898 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -67,6 +67,7 @@ require_once('dbupdate_3.4/25999_C4_permission.php'); require_once('dbupdate_3.4/33683_digitale_anwesenheitsliste_und_entschuldigungsmanagement_fuer_studierende_prototyp.php'); require_once('dbupdate_3.4/40717_lv_faktor.php'); require_once('dbupdate_3.4/48526_pep_tagging.php'); +require_once('dbupdate_3.4/54225_reihungstest_ablauf_fuer_quereinsteiger.php'); // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen @@ -377,6 +378,7 @@ $tabellen=array( "testtool.tbl_pruefling_frage" => array("prueflingfrage_id","pruefling_id","frage_id","nummer","begintime","endtime"), "testtool.tbl_frage_sprache" => array("frage_id","sprache","text","bild","audio","insertamum","insertvon","updateamum","updatevon"), "testtool.tbl_vorschlag_sprache" => array("vorschlag_id","sprache","text","bild","audio","insertamum","insertvon","updateamum","updatevon"), + "testtool.tbl_pruefling_gebiet" => array("prueflinggebiet_id","pruefling_id","gebiet_id","insertamum"), "system.tbl_app" => array("app"), "system.tbl_appdaten" => array("appdaten_id","uid","app","appversion","version","bezeichnung","daten","freigabe","insertamum","insertvon","updateamum","updatevon"), "system.tbl_cronjob" => array("cronjob_id","server_kurzbz","titel","beschreibung","file","last_execute","aktiv","running","jahr","monat","tag","wochentag","stunde","minute","standalone","reihenfolge","updateamum", "updatevon","insertamum","insertvon","variablen"), diff --git a/system/dbupdate_3.4/54225_reihungstest_ablauf_fuer_quereinsteiger.php b/system/dbupdate_3.4/54225_reihungstest_ablauf_fuer_quereinsteiger.php new file mode 100644 index 000000000..8898afdf3 --- /dev/null +++ b/system/dbupdate_3.4/54225_reihungstest_ablauf_fuer_quereinsteiger.php @@ -0,0 +1,39 @@ +db_query('SELECT 1 FROM testtool.tbl_pruefling_gebiet LIMIT 1')) +{ + $qry = 'CREATE TABLE testtool.tbl_pruefling_gebiet + ( + prueflinggebiet_id integer NOT NULL, + pruefling_id integer NOT NULL, + gebiet_id integer NOT NULL, + insertamum timestamp DEFAULT now() + ); + + ALTER TABLE testtool.tbl_pruefling_gebiet OWNER TO fhcomplete; + ALTER TABLE testtool.tbl_pruefling_gebiet ADD CONSTRAINT pk_tbl_pruefling_gebiet PRIMARY KEY (prueflinggebiet_id); + + CREATE SEQUENCE testtool.tbl_pruefling_gebiet_prueflinggebiet_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + ALTER TABLE testtool.tbl_pruefling_gebiet_prueflinggebiet_id_seq OWNER TO fhcomplete; + ALTER TABLE testtool.tbl_pruefling_gebiet ALTER COLUMN prueflinggebiet_id SET DEFAULT nextval(\'testtool.tbl_pruefling_gebiet_prueflinggebiet_id_seq\'); + + GRANT SELECT, UPDATE, INSERT, DELETE ON testtool.tbl_pruefling_gebiet TO web; + GRANT SELECT, UPDATE, INSERT, DELETE ON testtool.tbl_pruefling_gebiet TO vilesci; + GRANT SELECT, UPDATE ON testtool.tbl_pruefling_gebiet_prueflinggebiet_id_seq TO vilesci; + GRANT SELECT, UPDATE ON testtool.tbl_pruefling_gebiet_prueflinggebiet_id_seq TO web; + '; + + if (!$db->db_query($qry)) + echo 'public.tbl_pruefling_gebiet: '.$db->db_last_error().'
'; + else + echo '
public.tbl_pruefling_gebiet table created'; +} + From d3210f0d3d19eff642888f1803ee08d140266f19 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 18 Feb 2025 13:51:20 +0100 Subject: [PATCH 02/10] - foreign keys hinzugefuegt - beim zuruecksetzen der gebiete, wird auch tbl_pruefling_gebiet zurueckgesetzt --- ...eihungstest_ablauf_fuer_quereinsteiger.php | 2 + vilesci/stammdaten/auswertung_fhtw.php | 57 ++++++++++++++++++- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/system/dbupdate_3.4/54225_reihungstest_ablauf_fuer_quereinsteiger.php b/system/dbupdate_3.4/54225_reihungstest_ablauf_fuer_quereinsteiger.php index 8898afdf3..41532cfe0 100644 --- a/system/dbupdate_3.4/54225_reihungstest_ablauf_fuer_quereinsteiger.php +++ b/system/dbupdate_3.4/54225_reihungstest_ablauf_fuer_quereinsteiger.php @@ -14,6 +14,8 @@ if (!$result = @$db->db_query('SELECT 1 FROM testtool.tbl_pruefling_gebiet LIMIT ALTER TABLE testtool.tbl_pruefling_gebiet OWNER TO fhcomplete; ALTER TABLE testtool.tbl_pruefling_gebiet ADD CONSTRAINT pk_tbl_pruefling_gebiet PRIMARY KEY (prueflinggebiet_id); + ALTER TABLE testtool.tbl_pruefling_gebiet ADD CONSTRAINT fk_tbl_pruefling_gebiet_pruefling_id FOREIGN KEY (pruefling_id) REFERENCES testtool.tbl_pruefling(pruefling_id) ON UPDATE CASCADE ON DELETE RESTRICT; + ALTER TABLE testtool.tbl_pruefling_gebiet ADD CONSTRAINT fk_tbl_pruefling_gebiet_gebiet_id FOREIGN KEY (gebiet_id) REFERENCES testtool.tbl_gebiet(gebiet_id) ON UPDATE CASCADE ON DELETE RESTRICT; CREATE SEQUENCE testtool.tbl_pruefling_gebiet_prueflinggebiet_id_seq START WITH 1 diff --git a/vilesci/stammdaten/auswertung_fhtw.php b/vilesci/stammdaten/auswertung_fhtw.php index 8d928dacf..d4ece9c72 100644 --- a/vilesci/stammdaten/auswertung_fhtw.php +++ b/vilesci/stammdaten/auswertung_fhtw.php @@ -251,6 +251,31 @@ if ($deleteSingleResult) exit(); } + $qry = "SELECT * FROM testtool.tbl_pruefling_gebiet + WHERE pruefling_id=" . $db->db_add_param($pruefling->pruefling_id) . " AND gebiet_id=" . $db->db_add_param($_POST['gebiet_id']) . ""; + + if ($db->db_query($qry)) + { + while ($row = $db->db_fetch_object()) + { + $undo .= " INSERT INTO testtool.tbl_pruefling_gebiet(prueflinggebiet_id,pruefling_id,gebiet_id, insertamum) VALUES (" . + $db->db_add_param($row->prueflinggebiet_id, FHC_INTEGER) . ', ' . + $db->db_add_param($row->pruefling_id, FHC_INTEGER) . ', ' . + $db->db_add_param($row->gebiet_id, FHC_INTEGER) . ', ' . + $db->db_add_param($row->insertamum) . ');'; + } + } + else + { + $db->db_query('ROLLBACK'); + echo json_encode(array( + 'status' => 'fehler', + 'msg' => 'Fehler beim Erstellen des UNDO Befehls fuer testtool.tbl_pruefling_gebiet' + )); + exit(); + } + + //Antworten loeschen $qry = "DELETE FROM testtool.tbl_pruefling_frage where pruefling_id=" . $db->db_add_param($pruefling->pruefling_id, FHC_INTEGER) . " AND frage_id IN (SELECT frage_id FROM testtool.tbl_frage WHERE gebiet_id=" . $db->db_add_param($_POST['gebiet_id']) . "); @@ -258,7 +283,9 @@ if ($deleteSingleResult) DELETE FROM testtool.tbl_antwort WHERE pruefling_id=" . $db->db_add_param($pruefling->pruefling_id) . " AND vorschlag_id IN (SELECT vorschlag_id FROM testtool.tbl_vorschlag WHERE frage_id IN - (SELECT frage_id FROM testtool.tbl_frage WHERE gebiet_id=" . $db->db_add_param($_POST['gebiet_id']) . "));"; + (SELECT frage_id FROM testtool.tbl_frage WHERE gebiet_id=" . $db->db_add_param($_POST['gebiet_id']) . ")); + + DELETE FROM testtool.tbl_pruefling_gebiet where pruefling_id=" . $db->db_add_param($pruefling->pruefling_id, FHC_INTEGER) . " AND gebiet_id=" . $db->db_add_param($_POST['gebiet_id']) . ";"; if ($result = $db->db_query($qry)) { @@ -388,9 +415,35 @@ if ($deleteAllResults) exit(); } + $qry = "SELECT * FROM testtool.tbl_pruefling_gebiet WHERE pruefling_id=" . $db->db_add_param($pruefling->pruefling_id, FHC_INTEGER) . "; + "; + + if ($db->db_query($qry)) + { + while ($row = $db->db_fetch_object()) + { + $undo .= " INSERT INTO testtool.tbl_pruefling_gebiet(prueflinggebiet_id,pruefling_id,gebiet_id,insertamum) VALUES (" . + $db->db_add_param($row->prueflinggebiet_id, FHC_INTEGER) . ', ' . + $db->db_add_param($row->pruefling_id, FHC_INTEGER) . ', ' . + $db->db_add_param($row->gebiet_id, FHC_INTEGER) . ', ' . + $db->db_add_param($row->insertamum) . ');'; + } + } + else + { + $db->db_query('ROLLBACK'); + echo json_encode(array( + 'status' => 'fehler', + 'msg' => 'Fehler beim Erstellen des UNDO Befehls fuer testtool.tbl_pruefling_gebiet' + )); + exit(); + } + + //Antworten loeschen $qry = " DELETE FROM testtool.tbl_pruefling_frage where pruefling_id=".$db->db_add_param($pruefling->pruefling_id)."; - DELETE FROM testtool.tbl_antwort WHERE pruefling_id=".$db->db_add_param($pruefling->pruefling_id).";"; + DELETE FROM testtool.tbl_antwort where pruefling_id=".$db->db_add_param($pruefling->pruefling_id)."; + DELETE FROM testtool.tbl_pruefling_gebiet WHERE pruefling_id=".$db->db_add_param($pruefling->pruefling_id).";"; if ($result = $db->db_query($qry)) { From 6495f741b928498fa3e5580cef01a39f73ed0b06 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 9 Jul 2025 14:02:41 +0200 Subject: [PATCH 03/10] added missing phrase --- system/phrasesupdate.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 0203b3c2f..bc067f3f0 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -19663,6 +19663,26 @@ array( ) ) ), + array( + 'app' => 'international', + 'category' => 'international', + 'phrase' => 'personenMassnahmen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'alle Maßnahmen der Personen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => ' all measures of the people', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'international', 'category' => 'international', From 9183c4f04c37aecc9141aaddfaea077d4795ccfc Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 1 Oct 2025 12:03:18 +0200 Subject: [PATCH 04/10] massnahme einmalig flag hinzugefuegt --- system/phrasesupdate.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index ceb265b14..5078fb12d 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -19963,6 +19963,46 @@ array( ) ) ), + array( + 'app' => 'international', + 'category' => 'international', + 'phrase' => 'einmalig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nur einmal planbar', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'One-time only', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'international', + 'category' => 'international', + 'phrase' => 'erroreinmalig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Diese Maßnahme kann nur einmal geplant werden', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'This measure can only be planned once.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'gruppenmanagement', From c664c14afc07a4f98e0c43fa4b27894c5c18927a Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 18 Dec 2025 11:10:08 +0100 Subject: [PATCH 05/10] phrase hinzugefuegt --- system/phrasesupdate.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 5078fb12d..98dff6edb 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -19103,6 +19103,26 @@ array( ) ) ), + array( + 'app' => 'international', + 'category' => 'international', + 'phrase' => 'massnahmeneinmalig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Diese Maßnahme ist nur einmalig planbar.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'This measure may only be planned once.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'international', 'category' => 'international', From 224cef7fad2bcde883c43a9b89d8f755c0c990c0 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 17 Sep 2026 13:29:58 +0200 Subject: [PATCH 06/10] bug beim Loeschen von Antworten eines Prueflings in reihungstet_administration.php fixed --- vilesci/stammdaten/reihungstest_administration.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vilesci/stammdaten/reihungstest_administration.php b/vilesci/stammdaten/reihungstest_administration.php index 3b59e1961..89b071a0f 100644 --- a/vilesci/stammdaten/reihungstest_administration.php +++ b/vilesci/stammdaten/reihungstest_administration.php @@ -402,7 +402,10 @@ if(isset($_POST['deleteteilgebiet'])) DELETE FROM testtool.tbl_antwort WHERE pruefling_id=".$db->db_add_param($pruefling->pruefling_id)." AND vorschlag_id IN (SELECT vorschlag_id FROM testtool.tbl_vorschlag WHERE frage_id IN - (SELECT frage_id FROM testtool.tbl_frage WHERE gebiet_id=".$db->db_add_param($_POST['gebiet'])."));"; + (SELECT frage_id FROM testtool.tbl_frage WHERE gebiet_id=".$db->db_add_param($_POST['gebiet']).")); + + DELETE FROM testtool.tbl_pruefling_gebiet + WHERE pruefling_id=".$db->db_add_param($pruefling->pruefling_id)." AND gebiet_id=".$db->db_add_param($_POST['gebiet']).";"; if($result = $db->db_query($qry)) { @@ -497,7 +500,8 @@ if(isset($_POST['delete_all'])) } //Gebiet loeschen $qry = "DELETE FROM testtool.tbl_pruefling_frage where pruefling_id=".$db->db_add_param($pruefling->pruefling_id)."; - DELETE FROM testtool.tbl_antwort WHERE pruefling_id=".$db->db_add_param($pruefling->pruefling_id).";"; + DELETE FROM testtool.tbl_antwort WHERE pruefling_id=".$db->db_add_param($pruefling->pruefling_id)."; + DELETE FROM testtool.tbl_pruefling_gebiet WHERE pruefling_id=".$db->db_add_param($pruefling->pruefling_id).";"; if($result = $db->db_query($qry)) { From d25198785058e042c0c8f0505cf6ea3878de07a2 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Tue, 22 Sep 2026 16:50:56 +0200 Subject: [PATCH 07/10] backport compat controller and component --- application/controllers/Cis/Compat.php | 44 +++++++++ .../controllers/api/frontend/v1/CisMenu.php | 2 +- public/js/apps/Cis/Cis.js | 15 ++- public/js/components/Cis/Compat.js | 93 +++++++++++++++++++ 4 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 application/controllers/Cis/Compat.php create mode 100644 public/js/components/Cis/Compat.js diff --git a/application/controllers/Cis/Compat.php b/application/controllers/Cis/Compat.php new file mode 100644 index 000000000..5c99d8bfc --- /dev/null +++ b/application/controllers/Cis/Compat.php @@ -0,0 +1,44 @@ + ['basis/cis:r'], + 'legacy' => ['basis/cis:r'], + + ]); + } + + // ----------------------------------------------------------------------------------------------------------------- + // Public methods + + + /** + * @access public + * @return void + */ + public function ci() + { + $this->load->view('CisRouterView/CisRouterView.php',['route' => 'Compat']); + } + + /** + * @access public + * @return void + */ + public function legacy() + { + $this->load->view('CisRouterView/CisRouterView.php',['route' => 'Compat']); + } + +} diff --git a/application/controllers/api/frontend/v1/CisMenu.php b/application/controllers/api/frontend/v1/CisMenu.php index 439f52df6..5324f348b 100644 --- a/application/controllers/api/frontend/v1/CisMenu.php +++ b/application/controllers/api/frontend/v1/CisMenu.php @@ -83,7 +83,7 @@ class CisMenu extends FHCAPI_Controller return site_url("/CisVue/Cms/content/" . $menuItem->content_id); } - if (!$menuItem->content || !mb_strlen($menuItem->content)) { + if (!isset($menuItem->content) || !$menuItem->content || !mb_strlen($menuItem->content)) { return ''; } diff --git a/public/js/apps/Cis/Cis.js b/public/js/apps/Cis/Cis.js index d4f846f25..2ce04b9e9 100644 --- a/public/js/apps/Cis/Cis.js +++ b/public/js/apps/Cis/Cis.js @@ -19,6 +19,7 @@ import DeadlineOverview from "../../components/Cis/Abgabetool/DeadlineOverview.j import Studium from "../../components/Cis/Studium/Studium.js"; import StgOrgLvPlan from "../../components/Cis/LvPlan/StgOrg.js"; import OtherLvPlan from "../../components/Cis/LvPlan/OtherLvPlan.js"; +import Compat from "../../components/Cis/Compat.js"; import ApiRouteInfo from '../../api/factory/routeinfo.js'; import {capitalize} from "../../helpers/StringHelpers.js"; @@ -29,6 +30,18 @@ const isMobile = window.matchMedia("(max-width: 767px)").matches; const router = VueRouter.createRouter({ history: VueRouter.createWebHistory(`/${ciPath}`), routes: [ + { + path: `/Cis/Compat/:mode(ci|legacy)/:path(.*)`, + name: 'Compat', + component: Compat, + props: (route) => { + return { + mode: route.params.mode, + path: route.params.path, + query_string: VueRouter.stringifyQuery(route.query) + }; + } + }, { path: `/Cis/Studium`, name: 'Studium', @@ -277,7 +290,7 @@ const app = Vue.createApp({ if (target && this.isInternalRoute(target.href)) { const url = new URL(target.href) - const path = url.pathname + const path = url.pathname + url.search; const base = this.$router.options.history.base const route = path.replace(base, '') || '/' diff --git a/public/js/components/Cis/Compat.js b/public/js/components/Cis/Compat.js new file mode 100644 index 000000000..e6fb653f7 --- /dev/null +++ b/public/js/components/Cis/Compat.js @@ -0,0 +1,93 @@ +export default { + name: "Compat", + props: { + mode: { type: String, required: true }, + path: { type: String, required: true }, + query_string: { type: String, required: true, default: ''} + }, + data: function() { + return { + lastLoadediFrameURL: '', + srcUrl: '' + }; + }, + computed: { + propsWatchHelper: function() { + return this.mode + '#' + this.path + '#' + this.query_string; + } + }, + mounted: function() { + this.srcUrl = this.buildSrcUrl(); + }, + watch: { + propsWatchHelper: function() { + if(this.lastLoadediFrameURL === '') { + return; + } + + let currentiFrameURL = this.$refs.compatiframe ? this.$refs.compatiframe.src : ''; + + let url = this.buildSrcUrl(); + if(this.lastLoadediFrameURL !== url) { + this.srcUrl = url; + if(this.srcUrl === url) { + this.$refs.compatiframe.contentWindow.location.href = url; + } + } + } + }, + methods: { + buildSrcUrl: function() { + let url = false; + switch(this.mode) { + case 'ci': + url = FHC_JS_DATA_STORAGE_OBJECT.app_root + 'index.ci.php/' + this.path; + break; + case 'legacy': + url = FHC_JS_DATA_STORAGE_OBJECT.app_root + this.path; + break; + default: + url = false; + } + if(this.query_string !== '' && url) { + url += '?' + this.query_string; + } + + return url; + }, + loadHandler: function() { + let iframe_href = this.$refs.compatiframe.contentWindow.location.href; + let ci_urlstart = FHC_JS_DATA_STORAGE_OBJECT.app_root + 'index.ci.php/'; + let legacy_urlstart = FHC_JS_DATA_STORAGE_OBJECT.app_root; + let routerpath = null; + + this.lastLoadediFrameURL = iframe_href; + + if(iframe_href.startsWith(ci_urlstart)) { + routerpath = iframe_href.replace( + ci_urlstart, '/Cis/Compat/ci/'); + } else if(iframe_href.startsWith(legacy_urlstart)) { + routerpath = iframe_href.replace( + legacy_urlstart, '/Cis/Compat/legacy/'); + } else { + return; + } + + if(this.$route.fullPath !== routerpath) { + this.$router.push(routerpath); + } + } + }, + template: ` +
+ +
Keine URL gefunden.
+
+ ` +}; From d00aef66e195c26fe91eeb6a1c0afbcbb8e7ddae Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 23 Sep 2026 11:32:01 +0200 Subject: [PATCH 08/10] master gemerged --- cis/testtool/menu.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cis/testtool/menu.php b/cis/testtool/menu.php index 96279a946..ca85daf45 100644 --- a/cis/testtool/menu.php +++ b/cis/testtool/menu.php @@ -292,20 +292,20 @@ else if (isset($_SESSION['pruefling_id'])) if ($row->semester == '1') { // Basisgebiete anzeigen - echo '
'; + echo '
'; echo ''; } else { if (!$quereinsteiger_menu) { - echo '
' . $p->t('testtool/basisgebiete') . '
'; + echo '
'; echo ''; $quereinsteiger_menu = true; } else { - echo '
' . $p->t('testtool/quereinstiegsgebiete') . '
'; + echo '
'; } } } From 15c1da74a2ab5e9fd563adb190455251e727548a Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Wed, 23 Sep 2026 16:09:42 +0200 Subject: [PATCH 09/10] CisMenu: do not overwrite calculated url if menuitem is multiple times in menu tree --- application/controllers/api/frontend/v1/CisMenu.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/controllers/api/frontend/v1/CisMenu.php b/application/controllers/api/frontend/v1/CisMenu.php index 5324f348b..debab48a4 100644 --- a/application/controllers/api/frontend/v1/CisMenu.php +++ b/application/controllers/api/frontend/v1/CisMenu.php @@ -67,8 +67,11 @@ class CisMenu extends FHCAPI_Controller private function generateUrlForMenuItem($menuItem) { - $menuItem->url = $this->menuItemUrlHelper($menuItem); - unset($menuItem->content); + if(!isset($menuItem->url)) + { + $menuItem->url = $this->menuItemUrlHelper($menuItem); + unset($menuItem->content); + } if ($menuItem->childs && count($menuItem->childs)) { $menuItem->childs = $this->generateUrlsForMenuItems($menuItem->childs); From acedc11be8d440a8bc200f90e342f647075d24cc Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 24 Sep 2026 14:39:38 +0200 Subject: [PATCH 10/10] adapt styling detailheader employees --- public/js/components/DetailHeader/DetailHeader.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/public/js/components/DetailHeader/DetailHeader.js b/public/js/components/DetailHeader/DetailHeader.js index f57b679db..e1810fc78 100644 --- a/public/js/components/DetailHeader/DetailHeader.js +++ b/public/js/components/DetailHeader/DetailHeader.js @@ -542,10 +542,10 @@ export default {