From 625b3c74c42a6a2299156abeae0a13f52e4d3265 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 7 Sep 2022 09:22:06 +0200 Subject: [PATCH 01/49] =?UTF-8?q?Bewerbungstool:=20keine=20ZGV=20bei=20Abb?= =?UTF-8?q?rechern,=20Ber=C3=BCcksichtigung=20studentstatus=20f=C3=BCr=20D?= =?UTF-8?q?okumenthandling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/prestudent.class.php | 63 +++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index a958120cb..f5d59fd73 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -588,7 +588,7 @@ class prestudent extends person AND status_kurzbz = 'Interessent' - AND + AND NOT EXISTS ( SELECT 1 FROM public.tbl_prestudentstatus WHERE prestudent_id=tbl_prestudent.prestudent_id AND status_kurzbz='Abgewiesener' )"; @@ -2335,15 +2335,18 @@ class prestudent extends person return false; } - - $qry = "SELECT count(*) as anzahl FROM public.tbl_prestudent + $qry = "SELECT count(*) as anzahl + FROM public.tbl_prestudent pt JOIN public.tbl_prestudentstatus USING (prestudent_id) JOIN public.tbl_studiengang USING (studiengang_kz) WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." + AND NOT EXISTS + (SELECT * FROM public.tbl_prestudentstatus ps + WHERE ps.prestudent_id = pt.prestudent_id + AND status_kurzbz not in ('Abbrecher')) AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') AND typ in ('b','m','d')"; - if ($this->db_query($qry)) { if ($row = $this->db_fetch_object()) @@ -2372,6 +2375,58 @@ class prestudent extends person } } + /** + * Prueft, ob eine Person bereits einmal auf der FHTW Studierend war + * @param int $person_id ID der zu überprüfenden Person. + * @return true wenn vorhanden + * false wenn nicht vorhanden + * false und errormsg wenn Fehler aufgetreten ist + */ +public function isPastStudent($person_id) +{ + if (!is_numeric($person_id)) + { + $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; + return false; + } + + $qry = "SELECT count(*) as anzahl + FROM public.tbl_prestudent pt + JOIN public.tbl_prestudentstatus USING (prestudent_id) + JOIN public.tbl_studiengang USING (studiengang_kz) + WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." + AND status_kurzbz in ('Student') + AND typ in ('b','m','d') + "; + + if ($this->db_query($qry)) + { + if ($row = $this->db_fetch_object()) + { + if ($row->anzahl > 0) + { + $this->errormsg = ''; + return true; + } + else + { + $this->errormsg = ''; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } +} + /** * Befüllt MasterZGV-Felder: Nation mit Österreich und MasterZGV-code mit FH-Bachelor(I) * @param int $person_id Personenkennzeichen. From 604592cdd1d485498e6a0601b9cb2c1535dbf462 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 7 Sep 2022 15:27:47 +0200 Subject: [PATCH 02/49] Bewerbungstool: neue Funktion isPastAbbrecher() --- include/prestudent.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index f5d59fd73..cc48cd17d 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2376,13 +2376,13 @@ class prestudent extends person } /** - * Prueft, ob eine Person bereits einmal auf der FHTW Studierend war + * Prueft, ob eine Person Abbrecher war * @param int $person_id ID der zu überprüfenden Person. * @return true wenn vorhanden * false wenn nicht vorhanden * false und errormsg wenn Fehler aufgetreten ist */ -public function isPastStudent($person_id) +public function isPastAbbrecher($person_id) { if (!is_numeric($person_id)) { @@ -2395,7 +2395,7 @@ public function isPastStudent($person_id) JOIN public.tbl_prestudentstatus USING (prestudent_id) JOIN public.tbl_studiengang USING (studiengang_kz) WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." - AND status_kurzbz in ('Student') + AND status_kurzbz in ('Abbrecher') AND typ in ('b','m','d') "; From 3570b2c04dd80e222ebc0e77454db999fbd262bc Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 21 Sep 2022 12:54:41 +0200 Subject: [PATCH 03/49] =?UTF-8?q?BT:=20Adaptierung=20Pr=C3=BCfung=20auf=20?= =?UTF-8?q?Abbrecher=20auf=20aktuellen=20Prestudentstatus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/prestudent.class.php | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index cc48cd17d..9ba52dccd 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2336,15 +2336,10 @@ class prestudent extends person } $qry = "SELECT count(*) as anzahl - FROM public.tbl_prestudent pt + FROM public.tbl_prestudent JOIN public.tbl_prestudentstatus USING (prestudent_id) JOIN public.tbl_studiengang USING (studiengang_kz) WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." - AND NOT EXISTS - (SELECT * FROM public.tbl_prestudentstatus ps - WHERE ps.prestudent_id = pt.prestudent_id - AND status_kurzbz not in ('Abbrecher')) - AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') AND typ in ('b','m','d')"; if ($this->db_query($qry)) @@ -2378,11 +2373,11 @@ class prestudent extends person /** * Prueft, ob eine Person Abbrecher war * @param int $person_id ID der zu überprüfenden Person. - * @return true wenn vorhanden + * @return true wenn letzter Status Abbrecher und nicht Student ist * false wenn nicht vorhanden * false und errormsg wenn Fehler aufgetreten ist */ -public function isPastAbbrecher($person_id) +public function isAbbrecher($person_id) { if (!is_numeric($person_id)) { @@ -2390,20 +2385,22 @@ public function isPastAbbrecher($person_id) return false; } - $qry = "SELECT count(*) as anzahl - FROM public.tbl_prestudent pt - JOIN public.tbl_prestudentstatus USING (prestudent_id) - JOIN public.tbl_studiengang USING (studiengang_kz) - WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." - AND status_kurzbz in ('Abbrecher') - AND typ in ('b','m','d') + $qry = "SELECT s.status_kurzbz + FROM public.tbl_prestudent + JOIN public.tbl_prestudentstatus s USING (prestudent_id) + JOIN public.tbl_studiengang USING (studiengang_kz) + WHERE person_id = ".$this->db_add_param($person_id)." + AND status_kurzbz in ('Abbrecher','Student') + AND typ in ('b','m','d') + ORDER BY s.bestaetigtam DESC NULLS LAST, s.insertamum DESC + LIMIT 1 "; if ($this->db_query($qry)) { if ($row = $this->db_fetch_object()) { - if ($row->anzahl > 0) + if ($row->status_kurzbz == 'Abbrecher') { $this->errormsg = ''; return true; From b4d86744f21c9569544f2db986b5e318752f990a Mon Sep 17 00:00:00 2001 From: ma0048 Date: Fri, 30 Sep 2022 12:50:33 +0200 Subject: [PATCH 04/49] - fas zgv statt kurzbz auf bezeichnung --- content/student/studentdetailoverlay.xul.php | 12 ++++++------ rdf/zgv.rdf.php | 2 +- rdf/zgvdoktor.rdf.php | 2 +- rdf/zgvmaster.rdf.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/content/student/studentdetailoverlay.xul.php b/content/student/studentdetailoverlay.xul.php index 99b665cb2..279d194c5 100644 --- a/content/student/studentdetailoverlay.xul.php +++ b/content/student/studentdetailoverlay.xul.php @@ -355,7 +355,7 @@ echo ''; @@ -364,7 +364,7 @@ echo ''; @@ -425,7 +425,7 @@ echo ''; @@ -434,7 +434,7 @@ echo ''; @@ -497,7 +497,7 @@ echo ''; @@ -506,7 +506,7 @@ echo ''; diff --git a/rdf/zgv.rdf.php b/rdf/zgv.rdf.php index a3ce1225d..ce09c6c68 100644 --- a/rdf/zgv.rdf.php +++ b/rdf/zgv.rdf.php @@ -58,7 +58,7 @@ if(isset($_GET['optional']) && $_GET['optional']=='true') '; } -$qry = 'SELECT * FROM bis.tbl_zgv ORDER BY zgv_kurzbz'; +$qry = 'SELECT * FROM bis.tbl_zgv ORDER BY zgv_bez'; $db = new basis_db(); if($db->db_query($qry)) diff --git a/rdf/zgvdoktor.rdf.php b/rdf/zgvdoktor.rdf.php index 38dcec500..4201e8562 100644 --- a/rdf/zgvdoktor.rdf.php +++ b/rdf/zgvdoktor.rdf.php @@ -57,7 +57,7 @@ if(isset($_GET['optional']) && $_GET['optional']=='true') '; } -$qry = 'SELECT * FROM bis.tbl_zgvdoktor ORDER BY zgvdoktor_code'; +$qry = 'SELECT * FROM bis.tbl_zgvdoktor ORDER BY zgvdoktor_bez'; $db = new basis_db(); if($db->db_query($qry)) diff --git a/rdf/zgvmaster.rdf.php b/rdf/zgvmaster.rdf.php index b84af2c71..f8b643ee0 100644 --- a/rdf/zgvmaster.rdf.php +++ b/rdf/zgvmaster.rdf.php @@ -57,7 +57,7 @@ if(isset($_GET['optional']) && $_GET['optional']=='true') '; } -$qry = 'SELECT * FROM bis.tbl_zgvmaster ORDER BY zgvmas_code'; +$qry = 'SELECT * FROM bis.tbl_zgvmaster ORDER BY zgvmas_bez'; $db = new basis_db(); if($db->db_query($qry)) From 492562efdf4416d6382c1db2b9b75515656b8728 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 12 Oct 2022 11:46:03 +0200 Subject: [PATCH 05/49] - zeit hinzufuegen fuer den pruefling --- vilesci/stammdaten/auswertung_fhtw.php | 138 ++++++++++++++++++++++++- 1 file changed, 134 insertions(+), 4 deletions(-) diff --git a/vilesci/stammdaten/auswertung_fhtw.php b/vilesci/stammdaten/auswertung_fhtw.php index 9e8160808..46c604ab8 100644 --- a/vilesci/stammdaten/auswertung_fhtw.php +++ b/vilesci/stammdaten/auswertung_fhtw.php @@ -518,6 +518,67 @@ if ($rtprueflingEntSperren) } } +// Ajax-Request um einen Prüfling Zeit für ein bestimmtes Gebiet hinzuzufügen +$prueflingAddTime = filter_input(INPUT_POST, 'prueflingAddTime', FILTER_VALIDATE_BOOLEAN); +if ($prueflingAddTime) +{ + if (!$rechte->isBerechtigt('lehre/reihungstestAufsicht', null, 'su')) + { + echo json_encode(array( + 'status' => 'fehler', + 'msg' => $rechte->errormsg + )); + exit(); + } + + if (isset($_POST['pruefling_id']) && is_numeric($_POST['pruefling_id']) + && isset($_POST['gebiet']) && is_numeric($_POST['gebiet']) + && isset($_POST['time']) && is_numeric($_POST['time'])) + { + $qry = "UPDATE testtool.tbl_pruefling_frage + SET begintime = + CASE WHEN + (begintime + (" .$db->db_add_param($_POST['time']) . " * interval '1 minute') > NOW()) + THEN + NOW() + ELSE + (begintime + (" .$db->db_add_param($_POST['time']) . " * interval '1 minute')) + END, + endtime = + CASE WHEN + (endtime + (" .$db->db_add_param($_POST['time']) . " * interval '1 minute') > NOW()) + THEN + NOW() + ELSE + (endtime + (" .$db->db_add_param($_POST['time']) . " * interval '1 minute')) + END + WHERE prueflingfrage_id IN + ( + SELECT prueflingfrage_id + FROM testtool.tbl_pruefling + JOIN testtool.tbl_pruefling_frage USING (pruefling_id) + JOIN testtool.tbl_frage ON tbl_pruefling_frage.frage_id = tbl_frage.frage_id + WHERE pruefling_id = ". $db->db_add_param($_POST['pruefling_id']) . " AND gebiet_id = ". $db->db_add_param($_POST['gebiet']) ." + )"; + + if ($result = $db->db_query($qry)) + { + echo json_encode(array( + 'status' => 'ok', + 'msg' => 'Zeit hinzugefügt')); + exit(); + } + else + { + echo json_encode(array( + 'status' => 'fehler', + 'msg' => 'Fehler beim speichern der Daten' + )); + exit(); + } + } +} + // Ajax-Request um einen Reihungstest freizuschalten $rtFreischalten = filter_input(INPUT_POST, 'rtFreischalten', FILTER_VALIDATE_BOOLEAN); if ($rtFreischalten) @@ -1289,7 +1350,8 @@ if (isset($_REQUEST['reihungstest']) || isset($_POST['rtauswsubmit'])) tbl_ablauf.reihung, tbl_ablauf.studiengang_kz, tbl_ablauf.semester, - tbl_ablauf.gewicht + tbl_ablauf.gewicht, + tbl_gebiet.zeit FROM PUBLIC.tbl_rt_person JOIN PUBLIC.tbl_person ON (tbl_rt_person.person_id = tbl_person.person_id) JOIN PUBLIC.tbl_prestudent ps ON (ps.person_id = tbl_rt_person.person_id) @@ -1366,6 +1428,7 @@ if (isset($_REQUEST['reihungstest']) || isset($_POST['rtauswsubmit'])) } $gebiet[$row->gebiet_id]->name = $row->gebiet; $gebiet[$row->gebiet_id]->gebiet_id = $row->gebiet_id; + $gebiet[$row->gebiet_id]->zeit = $row->zeit; //gewicht ist meist für alle Studiengänge gleich (Bachelor, Master und Distance haben jeweilsandere Gebiete) if (!isset($gebiet[$row->gebiet_id]->gewicht)) { @@ -1487,6 +1550,7 @@ if (isset($_REQUEST['reihungstest']) || isset($_POST['rtauswsubmit'])) tbl_pruefling.idnachweis, tbl_pruefling.registriert, tbl_pruefling.gesperrt, + tbl_pruefling.pruefling_id, get_rolle_prestudent(prestudent_id, rt.studiensemester_kurzbz) AS letzter_status FROM PUBLIC.tbl_rt_person JOIN PUBLIC.tbl_person ON (tbl_rt_person.person_id = tbl_person.person_id) @@ -1601,7 +1665,7 @@ if (isset($_REQUEST['reihungstest']) || isset($_POST['rtauswsubmit'])) $ergebnis[$row->prestudent_id]->prestudent_id = $row->prestudent_id; $ergebnis[$row->prestudent_id]->person_id = $row->person_id; $ergebnis[$row->prestudent_id]->reihungstest_id = $row->reihungstest_id; - //$ergebnis[$row->prestudent_id]->pruefling_id = $row->pruefling_id; + $ergebnis[$row->prestudent_id]->pruefling_id = $row->pruefling_id; $ergebnis[$row->prestudent_id]->nachname = $row->nachname; $ergebnis[$row->prestudent_id]->vorname = $row->vorname; $ergebnis[$row->prestudent_id]->gebdatum = $row->gebdatum; @@ -2422,6 +2486,47 @@ else }); } } + function prueflingAddTime(pruefling_id, gebiet) + { + var datetime = $("#prueflingAddTime_" + pruefling_id + "_gebiet_" + gebiet).val(); + var min = parseInt(datetime.split(":")[1]); + data = { + pruefling_id: pruefling_id, + gebiet: gebiet, + time: min, + prueflingAddTime: true + }; + + $.ajax({ + url: "auswertung_fhtw.php", + data: data, + type: "POST", + dataType: "json", + success: function(data) + { + if(data.status !== "ok") + { + $("#msgbox").attr("class","alert alert-danger"); + $("#msgbox").show(); + $("#msgbox").html(data["msg"]); + } + else + { + $("#msgbox").attr("class","alert alert-success"); + $(".loaderIcon").hide(); + $("#msgbox").show(); + $("#msgbox").html(data["msg"]); + $("#msgbox").html(data["msg"]).delay(2000).fadeOut(); + } + }, + error: function(data) + { + $("#msgbox").attr("class","alert alert-danger"); + $("#msgbox").show(); + $("#msgbox").html(data["msg"]); + } + }); + } function deleteAllResults(prestudent_id, name) { if (confirm("Wollen Sie ALLE Ergebnisse der Person "+name+" wirklich löschen")) @@ -3143,7 +3248,7 @@ else foreach ($gebiet AS $gbt) { - echo '' . $gbt->name . ''; + echo '' . $gbt->name . ''; } echo ' @@ -3158,6 +3263,7 @@ else echo "Punkte"; echo "Punkte mit Offset"; echo "Prozent"; + echo "Zeit hinzufügen"; } echo ''; @@ -3265,10 +3371,34 @@ else echo ''; echo '' . ($erg->gebiet[$gbt->gebiet_id]->punktemitoffset != '' ? number_format($erg->gebiet[$gbt->gebiet_id]->punktemitoffset, 2, ',', ' ') : '') . ''; echo '' . ($erg->gebiet[$gbt->gebiet_id]->prozent != '' ? number_format($erg->gebiet[$gbt->gebiet_id]->prozent, 2, ',', ' ') . ' %' : '') . ''; + echo ''; + + if (!is_null($erg->pruefling_id)) + { + echo + ' + + + '; + } + echo ''; } else { - echo ''; + echo ''; } } From bfb24320d75edd21567c60de6dccb57440519b0e Mon Sep 17 00:00:00 2001 From: ma0048 Date: Fri, 14 Oct 2022 11:11:25 +0200 Subject: [PATCH 06/49] - editieren der ZGV Master nur noch mit eigenen Recht moeglich --- content/student/studentDBDML.php | 11 ++++++++++- content/student/studentoverlay.js.php | 14 ++++++++++++++ system/checksystem.php | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/content/student/studentDBDML.php b/content/student/studentDBDML.php index 68348adbf..97b40073f 100644 --- a/content/student/studentDBDML.php +++ b/content/student/studentDBDML.php @@ -821,7 +821,16 @@ if(!$error) $prestudent->zgvdatum = $_POST['zgvdatum']; $prestudent->zgvnation = $_POST['zgvnation']; $prestudent->zgv_erfuellt = $_POST['zgv_erfuellt']; - $prestudent->zgvmas_code = $_POST['zgvmas_code']; + // Die Master-ZGV darf nur mit einem eigenen Recht geändert werden + if($rechte->isBerechtigt('student/editMakkZgv',$_POST['studiengang_kz'],'suid')) + { + $prestudent->zgvmas_code = $_POST['zgvmas_code']; + } + elseif ($prestudent->zgvmas_code != $_POST['zgvmas_code']) + { + $errormsg = 'Keine Berechtigung zum Ändern der ZGV'; + $error = true; + } $prestudent->zgvmaort = $_POST['zgvmaort']; $prestudent->zgvmadatum = $_POST['zgvmadatum']; $prestudent->zgvmanation = $_POST['zgvmanation']; diff --git a/content/student/studentoverlay.js.php b/content/student/studentoverlay.js.php index 3401c03d5..02b59890e 100644 --- a/content/student/studentoverlay.js.php +++ b/content/student/studentoverlay.js.php @@ -1829,6 +1829,20 @@ function StudentPrestudentDisableFields(val) document.getElementById('student-prestudent-menulist-zgvcode').disabled=true; } + getStgKz('student/editMakkZgv'); + // Anlegen eines Arrays mit allen berechtigten Stg-Kz + echo ' var berechtigte_master_studiengaenge = ['.implode(',',$studiengaengeMaster).'];'; + ?> + if (berechtigte_master_studiengaenge.indexOf(studiengang_kz) >= 0) + { + document.getElementById('student-prestudent-menulist-zgvmastercode').disabled=val; + } + else + { + document.getElementById('student-prestudent-menulist-zgvmastercode').disabled=true; + } + //Status Tree leeren rollentree = document.getElementById('student-prestudent-tree-rolle'); diff --git a/system/checksystem.php b/system/checksystem.php index a52fb2a6d..ce343cdca 100644 --- a/system/checksystem.php +++ b/system/checksystem.php @@ -205,6 +205,7 @@ $berechtigungen = array( array('student/anwesenheit','Anwesenheiten im FAS'), array('student/dokumente','Wenn SUID dann dürfen Dokumente auch wieder entfernt werden'), array('student/editBakkZgv','Bearbeiten der Bachelor ZGV eines PreStudenten'), + array('student/editMakkZgv','Bearbeiten der Master ZGV eines PreStudenten'), array('student/noten','Notenverwaltung'), array('student/stammdaten','Stammdaten der Studenten'), array('student/vorrueckung','Studentenvorrückung'), From 382da823e4e22f3464bca656c425eee0643850cd Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 14 Oct 2022 16:12:41 +0200 Subject: [PATCH 07/49] Erweiterung Funktion existsZGV um LastStatusPrestudent --- include/prestudent.class.php | 113 +++++++++++------------------------ 1 file changed, 34 insertions(+), 79 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index 9ba52dccd..cd7eece35 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2335,94 +2335,49 @@ class prestudent extends person return false; } - $qry = "SELECT count(*) as anzahl - FROM public.tbl_prestudent - JOIN public.tbl_prestudentstatus USING (prestudent_id) - JOIN public.tbl_studiengang USING (studiengang_kz) - WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." - AND typ in ('b','m','d')"; - if ($this->db_query($qry)) - { - if ($row = $this->db_fetch_object()) - { - if ($row->anzahl > 0) + echo $qry = " + SELECT t.prestudent_id, t.status_kurzbz, t.bestaetigtam FROM + ( + SELECT prestudent_id, status_kurzbz, bestaetigtam, + RANK() OVER (PARTITION BY prestudent_id ORDER BY bestaetigtam DESC) stat_rank + FROM public.tbl_prestudent + JOIN public.tbl_prestudentstatus USING (prestudent_id) + WHERE person_id= ".$this->db_add_param($person_id, FHC_INTEGER)." + AND bestaetigtam is not NULL + AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student','Abbrecher') + ) as t + WHERE stat_rank = 1"; + + $db = new basis_db(); + $arrayPrestudents = array(); + + if ($db->db_query($qry)) { - $this->errormsg = ''; - return true; + $num_rows = $db->db_num_rows(); + + if ($num_rows > 0) + { + while ($row = $db->db_fetch_object()) + { + if ($row->status_kurzbz != 'Abbrecher') + $arrayPrestudents[] = $row->status_kurzbz; + } + if ($arrayPrestudents) + { + return true; + } + } + else + return false; } else { - $this->errormsg = ''; + $this->errormsg = 'Fehler beim Laden der Daten'; return false; } - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } } - /** - * Prueft, ob eine Person Abbrecher war - * @param int $person_id ID der zu überprüfenden Person. - * @return true wenn letzter Status Abbrecher und nicht Student ist - * false wenn nicht vorhanden - * false und errormsg wenn Fehler aufgetreten ist - */ -public function isAbbrecher($person_id) -{ - if (!is_numeric($person_id)) - { - $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; - return false; - } - - $qry = "SELECT s.status_kurzbz - FROM public.tbl_prestudent - JOIN public.tbl_prestudentstatus s USING (prestudent_id) - JOIN public.tbl_studiengang USING (studiengang_kz) - WHERE person_id = ".$this->db_add_param($person_id)." - AND status_kurzbz in ('Abbrecher','Student') - AND typ in ('b','m','d') - ORDER BY s.bestaetigtam DESC NULLS LAST, s.insertamum DESC - LIMIT 1 - "; - - if ($this->db_query($qry)) - { - if ($row = $this->db_fetch_object()) - { - if ($row->status_kurzbz == 'Abbrecher') - { - $this->errormsg = ''; - return true; - } - else - { - $this->errormsg = ''; - return false; - } - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } -} /** * Befüllt MasterZGV-Felder: Nation mit Österreich und MasterZGV-code mit FH-Bachelor(I) From 458117fced68fa5106f0025dd35fccf166ad1595 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 14 Oct 2022 16:24:45 +0200 Subject: [PATCH 08/49] =?UTF-8?q?Funktion=20existsZGV:=20prestudents=20mit?= =?UTF-8?q?=20Last=20Status=20Abbrecher=20werden=20nicht=20ber=C3=BCcksich?= =?UTF-8?q?tigt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/prestudent.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index cd7eece35..b9909306c 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2345,7 +2345,7 @@ class prestudent extends person JOIN public.tbl_prestudentstatus USING (prestudent_id) WHERE person_id= ".$this->db_add_param($person_id, FHC_INTEGER)." AND bestaetigtam is not NULL - AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student','Abbrecher') + AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') ) as t WHERE stat_rank = 1"; @@ -2360,7 +2360,6 @@ class prestudent extends person { while ($row = $db->db_fetch_object()) { - if ($row->status_kurzbz != 'Abbrecher') $arrayPrestudents[] = $row->status_kurzbz; } if ($arrayPrestudents) From 4f71a274e21d036a659da1796af3b7a619fcc6fe Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 17 Oct 2022 08:36:36 +0200 Subject: [PATCH 09/49] =?UTF-8?q?Update=20=C3=9Cberpr=C3=BCfungen=20ZGV=20?= =?UTF-8?q?mit=20get=5Frolle=5Fprestudent()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/prestudent.class.php | 88 +++++++++++++++++------------------- 1 file changed, 41 insertions(+), 47 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index b9909306c..31d5f69ef 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2327,55 +2327,49 @@ class prestudent extends person * false wenn nicht vorhanden * false und errormsg wenn Fehler aufgetreten ist */ - public function existsZGVIntern($person_id) - { - if (!is_numeric($person_id)) - { - $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; - return false; - } + public function existsZGVIntern($person_id) + { + if (!is_numeric($person_id)) + { + $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; + return false; + } + $qry = "SELECT count(*) as anzahl FROM public.tbl_prestudent + JOIN public.tbl_prestudentstatus USING (prestudent_id) + JOIN public.tbl_studiengang USING (studiengang_kz) + WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." + AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') + AND typ = 'b' + AND get_rolle_prestudent(prestudent_id, null) != 'Abbrecher';"; - echo $qry = " - SELECT t.prestudent_id, t.status_kurzbz, t.bestaetigtam FROM - ( - SELECT prestudent_id, status_kurzbz, bestaetigtam, - RANK() OVER (PARTITION BY prestudent_id ORDER BY bestaetigtam DESC) stat_rank - FROM public.tbl_prestudent - JOIN public.tbl_prestudentstatus USING (prestudent_id) - WHERE person_id= ".$this->db_add_param($person_id, FHC_INTEGER)." - AND bestaetigtam is not NULL - AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') - ) as t - WHERE stat_rank = 1"; - - $db = new basis_db(); - $arrayPrestudents = array(); - - if ($db->db_query($qry)) - { - $num_rows = $db->db_num_rows(); - - if ($num_rows > 0) - { - while ($row = $db->db_fetch_object()) - { - $arrayPrestudents[] = $row->status_kurzbz; - } - if ($arrayPrestudents) - { - return true; - } - } - else - return false; - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } + if ($this->db_query($qry)) + { + if ($row = $this->db_fetch_object()) + { + if ($row->anzahl > 0) + { + $this->errormsg = ''; + return true; + } + else + { + $this->errormsg = ''; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } /** From 0bd7d6f7c651feb244f39aca5f610b0b49e5a3f1 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 18 Oct 2022 11:00:57 +0200 Subject: [PATCH 10/49] - editieren von stammdaten im infocentertool --- .../system/infocenter/InfoCenter.php | 86 +++++++++++++++++++ .../models/person/Geschlecht_model.php | 14 +++ .../views/system/infocenter/stammdaten.php | 86 ++++++++++++++----- public/js/infocenter/stammdaten.js | 84 ++++++++++++++++++ system/phrasesupdate.php | 22 ++++- 5 files changed, 271 insertions(+), 21 deletions(-) create mode 100644 application/models/person/Geschlecht_model.php create mode 100644 public/js/infocenter/stammdaten.js diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 48c50bb4a..deaee0e10 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -121,6 +121,7 @@ class InfoCenter extends Auth_Controller 'unlockPerson' => 'infocenter:rw', 'saveFormalGeprueft' => 'infocenter:rw', 'saveDocTyp' => 'infocenter:rw', + 'updateStammdaten' => 'infocenter:rw', 'saveNachreichung' => 'infocenter:rw', 'getPrestudentData' => 'infocenter:r', 'getLastPrestudentWithZgvJson' => 'infocenter:r', @@ -172,6 +173,8 @@ class InfoCenter extends Auth_Controller $this->load->model('codex/Zgv_model', 'ZgvModel'); $this->load->model('codex/Zgvmaster_model', 'ZgvmasterModel'); $this->load->model('codex/Nation_model', 'NationModel'); + $this->load->model('person/Kontakt_model', 'KontaktModel'); + $this->load->model('person/Geschlecht_model', 'GeschlechtModel'); // Loads libraries $this->load->library('PersonLogLib'); @@ -1320,6 +1323,85 @@ class InfoCenter extends Auth_Controller $this->outputJsonSuccess('success'); } + public function updateStammdaten() + { + if (isEmptyString($this->input->post('nachname')) || + isEmptyString($this->input->post('geschlecht')) || + isEmptyString($this->input->post('gebdatum'))) + { + $this->terminateWithJsonError($this->p->t('infocenter', 'stammdatenFeldFehlt')); + } + + $datum = explode('.', $this->input->post('gebdatum')); + + if (!checkdate($datum[1], $datum[0], $datum[2])) + { + $this->terminateWithJsonError($this->p->t('infocenter', 'datumUngueltig')); + } + + $person_id = $this->input->post('personid'); + + $update = $this->PersonModel->update( + array + ( + 'person_id' => $person_id + ), + array + ( + 'titelpre' => isEmptyString($this->input->post('titelpre')) ? null : $this->input->post('titelpre'), + 'vorname' => isEmptyString($this->input->post('vorname')) ? null : $this->input->post('vorname'), + 'nachname' => $this->input->post('nachname'), + 'titelpost' => isEmptyString($this->input->post('titelpost')) ? null : $this->input->post('titelpost'), + 'gebdatum' => isEmptyString($this->input->post('gebdatum')) ? null : date("Y-m-d", strtotime($this->input->post('gebdatum'))), + 'svnr' => isEmptyString($this->input->post('svnr')) ? null : $this->input->post('svnr'), + 'staatsbuergerschaft' => isEmptyString($this->input->post('buergerschaft')) ? null : $this->input->post('buergerschaft'), + 'geschlecht' => $this->input->post('geschlecht'), + 'geburtsnation' => isEmptyString($this->input->post('gebnation')) ? null : $this->input->post('gebnation'), + 'gebort' => isEmptyString($this->input->post('gebort')) ? null : $this->input->post('gebort'), + 'updateamum' => date('Y-m-d H:i:s'), + 'updatevon' => $this->_uid + ) + ); + + if (isError($update)) + $this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern')); + + $kontakte = $this->input->post('kontakt'); + foreach($kontakte as $kontakt) + { + $kontaktExists = $this->KontaktModel->loadWhere(array( + 'kontakt_id' => $kontakt['id'], + 'person_id' => $person_id, + )); + + if (hasData($kontaktExists)) + { + $kontaktExists = getData($kontaktExists)[0]; + + if ($kontaktExists->kontakt === $kontakt['value']) + continue; + + $update = $this->KontaktModel->update( + array + ( + 'kontakt_id' => $kontakt['id'] + ), + array + ( + 'kontakt' => isEmptyString($kontakt['value']) ? null : $kontakt['value'], + 'updateamum' => date('Y-m-d H:i:s'), + 'updatevon' => $this->_uid + ) + ); + + if (isError($update)) + $this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern')); + } + } + + $this->outputJsonSuccess('Success'); + } + public function saveNachreichung($person_id) { $nachreichungAm = $this->input->post('nachreichungAm'); @@ -1996,6 +2078,9 @@ class InfoCenter extends Auth_Controller $this->NationModel->addOrder('langtext'); $allNations = getData($this->NationModel->load()); + $this->GeschlechtModel->addOrder('sort'); + $allGenders = getData($this->GeschlechtModel->load()); + $data = array ( 'zgvpruefungen' => $zgvpruefungen, 'abwstatusgruende' => $abwstatusgruende, @@ -2004,6 +2089,7 @@ class InfoCenter extends Auth_Controller 'all_zgvs' => $allZGVs, 'all_zgvs_master' => $allZGVsMaster, 'all_nations' => $allNations, + 'all_genders' => $allGenders ); return $data; diff --git a/application/models/person/Geschlecht_model.php b/application/models/person/Geschlecht_model.php new file mode 100644 index 000000000..60ac3ba15 --- /dev/null +++ b/application/models/person/Geschlecht_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_geschlecht'; + $this->pk = 'geschlecht'; + } +} diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php index a80439bfe..595f86b1a 100644 --- a/application/views/system/infocenter/stammdaten.php +++ b/application/views/system/infocenter/stammdaten.php @@ -1,60 +1,93 @@
-
+
- titelpre)): ?> - + - + - + + + + + + - titelpost)): ?> - - - - - + + + + + + + + - +
p->t('person','titelpre')) ?>titelpre ?>
p->t('person','vorname')) ?>vorname ?>
p->t('person','nachname')) ?> - nachname ?>
p->t('person','titelpost')) ?>
p->t('person','titelpost')) ?>titelpost ?>
p->t('person','geburtsdatum')) ?> - gebdatum), 'd.m.Y') ?>
p->t('person','svnr')) ?> - svnr ?>
p->t('person','staatsbuergerschaft')) ?> - staatsbuergerschaft ?>
p->t('person','geschlecht')) ?> - geschlecht ?>
p->t('person','geburtsnation')) ?> - geburtsnation ?>
p->t('person','geburtsort')) ?>gebort ?>
- +
@@ -83,7 +116,10 @@ kontakt; endif; - echo $kontakt->kontakt; + if (($kontakt->kontakttyp === 'telefon' || $kontakt->kontakttyp === 'mobil')) + echo 'kontakt; if ($kontakt->kontakttyp === 'email'): ?> @@ -126,6 +162,16 @@ target='_blank'> p->t('infocenter','zugangBewerbung') ?> + diff --git a/public/js/infocenter/stammdaten.js b/public/js/infocenter/stammdaten.js new file mode 100644 index 000000000..d63df7b2f --- /dev/null +++ b/public/js/infocenter/stammdaten.js @@ -0,0 +1,84 @@ +$(document).ready(function () +{ + var personid = $("#hiddenpersonid").val(); + + $('.editStammdaten').click(function() + { + Stammdaten._show(); + }); + + $('.cancelStammdaten').click(function() + { + Stammdaten._hide(); + }); + + $('.saveStammdaten').click(function() + { + var kontakt = []; + $('.kontakt_nummer').each(function(){ + kontakt.push({ + id: $(this).data('value'), + value: $(this).val() + }); + }); + + var data = { + "personid" : personid, + "titelpre" : $('#titelpre').val(), + "vorname" : $('#vorname').val(), + "nachname" : $('#nachname').val(), + "titelpost" : $('#titelpost').val(), + "gebdatum" : $('#gebdatum').val(), + "svnr" : $('#svnr').val(), + "buergerschaft" : $('#buergerschaft').val(), + "geschlecht" : $('#geschlecht').val(), + "gebnation" : $('#gebnation').val(), + "gebort" : $('#gebort').val(), + "kontakt" : kontakt + + }; + Stammdaten.update(personid, data); + }); +}); + +var Stammdaten = { + update: function(personid, data) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + "/updateStammdaten/", + data, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.isSuccess(data)) + { + FHC_DialogLib.alertSuccess("Done!"); + Stammdaten._hide(); + } + else + { + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); + } + }, + errorCallback: function() { + FHC_DialogLib.alertWarning("Fehler beim Speichern!"); + } + } + ); + }, + + _hide: function() + { + $('.stammdaten_form').find('input, select').attr('readonly', true); + + $('.editActionStammdaten').hide(); + $('.editStammdaten').show(); + }, + + _show: function() + { + $('.stammdaten_form').find('input, select').attr('readonly', false); + + $('.editActionStammdaten').show(); + $('.editStammdaten').hide(); + } +} \ No newline at end of file diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 8ac09cee0..3151eb0f5 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -17137,7 +17137,27 @@ array( 'insertvon' => 'system' ) ) - ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'stammdatenFeldFehlt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bitte Nachname, Geschlecht und Geburtsdatum ausfüllen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Please fill out the last name, gender and date of birth.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From 1609543a3128b98480dd42585e3a07269f6c1e20 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 20 Oct 2022 14:01:31 +0200 Subject: [PATCH 11/49] - lv evaluierung ubersichtsseite optimiert --- include/lehrveranstaltung.class.php | 85 +++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/include/lehrveranstaltung.class.php b/include/lehrveranstaltung.class.php index 16c7ba2fe..48edd9d0a 100644 --- a/include/lehrveranstaltung.class.php +++ b/include/lehrveranstaltung.class.php @@ -2776,5 +2776,90 @@ class lehrveranstaltung extends basis_db return null; } + /** + * Prueft ob die Lehrveranstaltungen in dem Studiensemestern angeboten wird. + * Dazu wird geprueft ob die LVs einem aktuellen Studienplan zugeordnet ist und ob ein Lehrauftrag vorhanden ist. + * + * @param $lehrveranstaltung_id + * @param $studiensemester_kurzbz + * @return array + */ + public function getOfferedSemester($lehrveranstaltung_id, $studiensemester_kurzbz) + { + $qry = "SELECT + DISTINCT(studiensemester_kurzbz) + FROM + lehre.tbl_lehreinheit + WHERE lehrveranstaltung_id = ".$this->db_add_param($lehrveranstaltung_id)." + AND studiensemester_kurzbz IN (".$this->db_implode4SQL($studiensemester_kurzbz).") + AND EXISTS ( + SELECT + * + FROM + lehre.tbl_studienplan_lehrveranstaltung + JOIN lehre.tbl_studienplan_semester USING(studienplan_id) + WHERE + lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id)." + AND studiensemester_kurzbz IN (".$this->db_implode4SQL($studiensemester_kurzbz).") + )"; + + $studiensemester = []; + if($result = $this->db_query($qry)) + { + while($row = $this->db_fetch_object($result)) + { + $studiensemester[] = $row; + } + return $studiensemester; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + + /** + * Prueft ob die Lehrveranstaltungen in den gewaehlten Studiensemestern angeboten wird. + * Dazu wird geprueft ob die LVs einem aktuellen Studienplan zugeordnet ist, und ob ein Lehrauftrag vorhanden ist. + * + * @param $lehrveranstaltung_id + * @param $studiensemester_kurzbz + * @return array + */ + public function getOfferedLVs($lehrveranstaltung_id, $studiensemester_kurzbz) + { + $qry = "SELECT + DISTINCT(tbl_lehreinheit.lehrveranstaltung_id) + FROM + lehre.tbl_lehreinheit + WHERE tbl_lehreinheit.lehrveranstaltung_id IN (".$this->db_implode4SQL($lehrveranstaltung_id).") + AND tbl_lehreinheit.studiensemester_kurzbz IN (".$this->db_implode4SQL($studiensemester_kurzbz).") + AND EXISTS ( + SELECT + * + FROM + lehre.tbl_studienplan_lehrveranstaltung + JOIN lehre.tbl_studienplan_semester USING(studienplan_id) + WHERE + tbl_lehreinheit.lehrveranstaltung_id IN (".$this->db_implode4SQL($lehrveranstaltung_id).") + AND tbl_lehreinheit.studiensemester_kurzbz IN (".$this->db_implode4SQL($studiensemester_kurzbz).") + )"; + + $lehrveranstaltungen = []; + if($result = $this->db_query($qry)) + { + while($row = $this->db_fetch_object($result)) + { + $lehrveranstaltungen[] = $row; + } + return $lehrveranstaltungen; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } } ?> From 53dc6b3c631f708d995a8ba43979f421e2a51bb8 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Fri, 21 Oct 2022 11:07:52 +0200 Subject: [PATCH 12/49] - tag closed --- application/views/system/infocenter/stammdaten.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php index 595f86b1a..6dba795d9 100644 --- a/application/views/system/infocenter/stammdaten.php +++ b/application/views/system/infocenter/stammdaten.php @@ -117,7 +117,7 @@ kontakt; endif; if (($kontakt->kontakttyp === 'telefon' || $kontakt->kontakttyp === 'mobil')) - echo ''; else echo $kontakt->kontakt; if ($kontakt->kontakttyp === 'email'): From bf8aa6c4ac89566c6861a3c8a77d5beafb99d556 Mon Sep 17 00:00:00 2001 From: Manfred Date: Mon, 24 Oct 2022 12:23:03 +0200 Subject: [PATCH 13/49] =?UTF-8?q?Student=20im=20Max-Semester=20nicht=20vor?= =?UTF-8?q?r=C3=BCcken?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vilesci/personen/student_vorrueckung.php | 46 +++++++++++++++++++++--- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/vilesci/personen/student_vorrueckung.php b/vilesci/personen/student_vorrueckung.php index 8eb858f30..4a49cb436 100644 --- a/vilesci/personen/student_vorrueckung.php +++ b/vilesci/personen/student_vorrueckung.php @@ -212,6 +212,7 @@ if (isset($_POST['vorr'])) $statisticAdded = 0; $statisticUebersprungen = 0; $statisticStudienplanKorrektur = 0; + $errorMsg = array(); $stg_help = new studiengang(); if (!$stg_help->load($stg_kz)) @@ -306,13 +307,40 @@ if (isset($_POST['vorr'])) //auf statusgrund_kurzbz abfragen $statusgrundObj = new statusgrund($row_status->statusgrund_id); $statusgrundId = null; - if ($statusgrundObj->statusgrund_kurzbz === "prewiederholer" && $row_status->ausbildungssemester > 1) + if (isset($statusgrundObj->statusgrund_kurzbz) && $statusgrundObj->statusgrund_kurzbz === "prewiederholer" && $row_status->ausbildungssemester > 1) { $s = $row->semester_stlv - 1; $ausbildungssemester = $row_status->ausbildungssemester - 1; $statusgrundId = $statusgrundObj->getByStatusgrundKurzbz('wiederholer')->statusgrund_id; } + // Wenn VORRUECKUNG_STATUS_MAX_SEMESTER true ist und + // der Student kein Wiederholer ist und + // der aktuelle Status "Student" im Max-Semester des Studiengangs ist, wird übersprungen + if (VORRUECKUNG_STATUS_MAX_SEMESTER + && $statusgrundId == '' + && $row_status->ausbildungssemester == $max[$stg_kz] + && $row_status->status_kurzbz == 'Student') + { + $statisticUebersprungen++; + $errorMsg['Studenten im letzten Ausbildungssemester ohne Diplomandenstatus']++; + continue; + + /* + $sqlInsertDiplomand = "INSERT INTO public.tbl_prestudentstatus (prestudent_id, status_kurzbz, + studiensemester_kurzbz, ausbildungssemester, datum, insertamum, + insertvon, updateamum, updatevon, ext_id, orgform_kurzbz, studienplan_id, statusgrund_id) + VALUES (".$db->db_add_param($row->prestudent_id).", ". + $db->db_add_param($status_kurzbz).", ". + $db->db_add_param($next_ss).", ". + $db->db_add_param($ausbildungssemester).", now(), now(), ". + $db->db_add_param($user).", NULL, NULL, NULL, ". + $db->db_add_param($row_status->orgform_kurzbz).", ". + $db->db_add_param($studienplan_id).", ". + $db->db_add_param($statusgrundId).");"; + */ + } + $lvb = new lehrverband(); //Lehrverbandgruppe anlegen, wenn noch nicht vorhanden @@ -352,6 +380,7 @@ if (isset($_POST['vorr'])) $db->db_add_param($row->gruppe_stlv).",NULL,NULL,now(),". $db->db_add_param($user).",NULL);"; } + //Check, ob schon ein Status für das Zielsemester vorhanden ist $qry_chk = "SELECT * FROM @@ -360,7 +389,8 @@ if (isset($_POST['vorr'])) prestudent_id=".$db->db_add_param($row->prestudent_id)." AND studiensemester_kurzbz=".$db->db_add_param($next_ss).";"; - if ($db->db_num_rows($db->db_query($qry_chk)) < 1) + if ($db->db_num_rows($db->db_query($qry_chk)) < 1 + && $row_status->status_kurzbz != 'Absolvent') { // Pruefen ob der Studienplan fuer das vorgerueckte Semester noch gueltig ist // und GGf einen besseren Studienplan suchen @@ -405,9 +435,15 @@ if (isset($_POST['vorr'])) } } echo ''; - echo 'Vorgerückte Personen:'.$statisticAdded.'
'; - echo 'Übersprungene Personen:'.$statisticUebersprungen.'
'; - echo 'Studienplanzuordnung korrigiert:'.$statisticStudienplanKorrektur.'
'; + echo 'Vorgerückte Personen: '.$statisticAdded.'
'; + echo 'Übersprungene Personen: '.$statisticUebersprungen.'
'; + echo 'Studienplanzuordnung korrigiert: '.$statisticStudienplanKorrektur.'
'; + echo '
'; + echo ''; + foreach($errorMsg AS $key=>$value) + { + echo 'Fehler: '.$key.': '.$value; + } echo ''; } From 572e53f554f2d290d8f3d2241dbbfb134634c7b8 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 25 Oct 2022 07:02:13 +0200 Subject: [PATCH 14/49] - addon angepassst fuer die stammdaten --- application/views/system/infocenter/stammdaten.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php index 6dba795d9..ac8f6347c 100644 --- a/application/views/system/infocenter/stammdaten.php +++ b/application/views/system/infocenter/stammdaten.php @@ -111,13 +111,13 @@
- @@ -100,7 +93,6 @@
p->t('global','kontakt')) ?> kontakttyp) ?> - kontakttyp.'">';?> + kontakttyp.'" data-value="'. $kontakt->kontakt .'">';?> kontakttyp === 'email'): ?> kontakt; endif; if (($kontakt->kontakttyp === 'telefon' || $kontakt->kontakttyp === 'mobil')) - echo ''; + echo ''; else echo $kontakt->kontakt; if ($kontakt->kontakttyp === 'email'): From 9192befce1cf461f9474865b1f7bddf7dd685346 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 25 Oct 2022 07:08:29 +0200 Subject: [PATCH 15/49] - stammdaten include --- application/views/system/infocenter/infocenterZgvDetails.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index 62fefbec8..5bfb6c603 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -26,7 +26,8 @@ 'public/js/tablesort/tablesort.js', 'public/js/infocenter/messageList.js', 'public/js/infocenter/infocenterDetails.js', - 'public/js/infocenter/zgvUeberpruefung.js' + 'public/js/infocenter/zgvUeberpruefung.js', + 'public/js/infocenter/stammdaten.js', ), 'phrases' => array( 'infocenter' => array( From 4518eab1a81a94697c8ee6b4293ba7a8a5dd8e2f Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 25 Oct 2022 07:14:47 +0200 Subject: [PATCH 16/49] - stammdaten include --- application/views/system/infocenter/infocenterDetails.php | 3 ++- application/views/system/infocenter/infocenterZgvDetails.php | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index 76a371c11..c8b16a1c3 100644 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -27,7 +27,8 @@ 'public/js/infocenter/messageList.js', 'public/js/infocenter/infocenterDetails.js', 'public/js/infocenter/zgvUeberpruefung.js', - 'public/js/infocenter/docUeberpruefung.js' + 'public/js/infocenter/docUeberpruefung.js', + 'public/js/infocenter/stammdaten.js' ), 'phrases' => array( 'infocenter' => array( diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index 5bfb6c603..62fefbec8 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -26,8 +26,7 @@ 'public/js/tablesort/tablesort.js', 'public/js/infocenter/messageList.js', 'public/js/infocenter/infocenterDetails.js', - 'public/js/infocenter/zgvUeberpruefung.js', - 'public/js/infocenter/stammdaten.js', + 'public/js/infocenter/zgvUeberpruefung.js' ), 'phrases' => array( 'infocenter' => array( From f0fd071e312d0010431a3caca56afcb070cb6461 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 31 Oct 2022 13:44:17 +0100 Subject: [PATCH 17/49] - notizen ausblenden --- content/lvplanung/lehrveranstaltungoverlay.js.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/content/lvplanung/lehrveranstaltungoverlay.js.php b/content/lvplanung/lehrveranstaltungoverlay.js.php index 436c48eb8..ac2c94948 100644 --- a/content/lvplanung/lehrveranstaltungoverlay.js.php +++ b/content/lvplanung/lehrveranstaltungoverlay.js.php @@ -820,7 +820,12 @@ function LeAuswahl() LehrveranstaltungNotenLoad(lehrveranstaltung_id); //Notizen Tab ausblenden - //document.getElementById('lehrveranstaltung-tab-notizen').collapsed=true; + document.getElementById('lehrveranstaltung-tab-notizen').collapsed=true; + + if(document.getElementById('lehrveranstaltung-tabs').selectedItem === document.getElementById('lehrveranstaltung-tab-notizen')) + { + document.getElementById('lehrveranstaltung-tabs').selectedItem = document.getElementById('lehrveranstaltung-tab-detail'); + } //LV-Angebot Tab einblenden und Gruppen laden document.getElementById('lehrveranstaltung-tab-lvangebot').collapsed=false; @@ -853,7 +858,7 @@ function LeAuswahl() //document.getElementById('lehrveranstaltung-tab-noten').collapsed=true; //Notizen Tab einblenden - //document.getElementById('lehrveranstaltung-tab-notizen').collapsed=false; + document.getElementById('lehrveranstaltung-tab-notizen').collapsed=false; //LV-Angebot Tab ausblenden document.getElementById('lehrveranstaltung-tab-lvangebot').collapsed=true; From 651a4a97e7f22138ce7ac683445a08fcedd2a8f6 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 2 Nov 2022 16:50:53 +0100 Subject: [PATCH 18/49] - stammdaten editierbar --- .../system/infocenter/InfoCenter.php | 44 +++++- .../views/system/infocenter/stammdaten.php | 76 ++++++++--- public/js/infocenter/stammdaten.js | 128 +++++++++++++++++- 3 files changed, 225 insertions(+), 23 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index deaee0e10..187a006bd 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -175,6 +175,7 @@ class InfoCenter extends Auth_Controller $this->load->model('codex/Nation_model', 'NationModel'); $this->load->model('person/Kontakt_model', 'KontaktModel'); $this->load->model('person/Geschlecht_model', 'GeschlechtModel'); + $this->load->model('person/adresse_model', 'AdresseModel'); // Loads libraries $this->load->library('PersonLogLib'); @@ -1367,7 +1368,7 @@ class InfoCenter extends Auth_Controller $this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern')); $kontakte = $this->input->post('kontakt'); - foreach($kontakte as $kontakt) + foreach ($kontakte as $kontakt) { $kontaktExists = $this->KontaktModel->loadWhere(array( 'kontakt_id' => $kontakt['id'], @@ -1398,6 +1399,47 @@ class InfoCenter extends Auth_Controller $this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern')); } } + + $adressen = $this->input->post('adresse'); + + foreach ($adressen as $adresse) + { + $adresseExists = $this->AdresseModel->loadWhere(array( + 'adresse_id' => $adresse['id'], + 'person_id' => $person_id, + )); + + if (hasData($adresseExists)) + { + $adresse = $adresse['value']; + $adresseExists = getData($adresseExists)[0]; + if ($adresseExists->strasse !== $adresse['strasse'] || + $adresseExists->plz !== $adresse['plz'] || + $adresseExists->ort !== $adresse['ort'] || + $adresseExists->nation !== $adresse['nation']) + { + $update = $this->AdresseModel->update( + array + ( + 'adresse_id' => $adresseExists->adresse_id + ), + array + ( + 'strasse' => isEmptyString($adresse['strasse']) ? null : $adresse['strasse'], + 'plz' => isEmptyString($adresse['plz']) ? null : $adresse['plz'], + 'ort' => isEmptyString($adresse['ort']) ? null : $adresse['ort'], + 'nation' => isEmptyString($adresse['nation']) ? null : $adresse['nation'], + 'updateamum' => date('Y-m-d H:i:s'), + 'updatevon' => $this->_uid + ) + ); + + if (isError($update)) + $this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern')); + } + + } + } $this->outputJsonSuccess('Success'); } diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php index ac8f6347c..47cf7b253 100644 --- a/application/views/system/infocenter/stammdaten.php +++ b/application/views/system/infocenter/stammdaten.php @@ -3,36 +3,52 @@ - + + - + +
nachname ?>
+ + - + +
gebdatum), 'd.m.Y') ?>
+ + +
svnr ?>
+ + - +
p->t('person','titelpre')) ?> +
titelpre ?>
+
p->t('person','vorname')) ?> +
vorname ?>
+ + +
p->t('person','nachname')) ?> -
p->t('person','titelpost')) ?> +
titelpost ?>
+ +
p->t('person','geburtsdatum')) ?> -
p->t('person','svnr')) ?> -
p->t('person','staatsbuergerschaft')) ?> - - p->t('person','geburtsnation')) ?> -
p->t('person','geburtsort')) ?> +
gebort ?>
+ +
@@ -111,14 +130,14 @@
kontakttyp) ?> - kontakttyp.'" data-value="'. $kontakt->kontakt .'">';?> + kontakttyp.'" data-id="'. $kontakt->kontakt_id .'" data-value="' . $kontakt->kontakt .'">';?> kontakttyp === 'email'): ?> kontakt; endif; - if (($kontakt->kontakttyp === 'telefon' || $kontakt->kontakttyp === 'mobil')) - echo ''; - else + /*if (($kontakt->kontakttyp === 'telefon' || $kontakt->kontakttyp === 'mobil')) + echo ''; + else*/ echo $kontakt->kontakt; if ($kontakt->kontakttyp === 'email'): ?> @@ -135,8 +154,33 @@ p->t('person','adresse')) ?> - strasse.', '.$adresse->plz.' '.$adresse->ort : '' ?> - nationkurztext) ? '
'.$adresse->nationkurztext : '' ?> + +
+
strasse ?>
+ + +
plz ?>
+ + +
ort ?>
+ + + nationkurztext)): ?> + +
+
+ +
heimatadresse === true ? 'Heimatadresse' : ''). diff --git a/public/js/infocenter/stammdaten.js b/public/js/infocenter/stammdaten.js index d63df7b2f..a8a15b23b 100644 --- a/public/js/infocenter/stammdaten.js +++ b/public/js/infocenter/stammdaten.js @@ -15,13 +15,27 @@ $(document).ready(function () $('.saveStammdaten').click(function() { var kontakt = []; - $('.kontakt_nummer').each(function(){ + $('.kontakt_input').each(function(){ kontakt.push({ - id: $(this).data('value'), + id: $(this).data('id'), value: $(this).val() }); }); + var adresse = []; + $('.adresse').each(function(){ + var id = $(this).data('value'); + adresse.push({ + id: id, + value: { + 'strasse': $('#input_strasse_' + id).val(), + 'plz': $('#input_plz_' + id).val(), + 'ort': $('#input_ort_' + id).val(), + 'nation': $('#nation_' + id).val(), + } + }); + }); + var data = { "personid" : personid, "titelpre" : $('#titelpre').val(), @@ -34,8 +48,8 @@ $(document).ready(function () "geschlecht" : $('#geschlecht').val(), "gebnation" : $('#gebnation').val(), "gebort" : $('#gebort').val(), - "kontakt" : kontakt - + "kontakt" : kontakt, + "adresse" : adresse, }; Stammdaten.update(personid, data); }); @@ -52,6 +66,8 @@ var Stammdaten = { if (FHC_AjaxClient.isSuccess(data)) { FHC_DialogLib.alertSuccess("Done!"); + Stammdaten._showKontakt(); + Stammdaten._showAdresse(); Stammdaten._hide(); } else @@ -66,9 +82,62 @@ var Stammdaten = { ); }, + _showKontakt: function() + { + $('.kontakt_input').each(function() { + var span = $(this).parent('td').children('span'); + var value = $(this).val(); + + var oldSpanValue = span.data('value'); + span.data('value', value); + var newhtml = span.html().replace(oldSpanValue, value); + span.html(newhtml); + if (span.hasClass('email')) + span.find('a').attr('href', 'mailto:' + value); + + span.show(); + $(this).remove(); + }); + }, + + _showAdresse: function() + { + $('.adresse').each(function() { + var adressenID = $(this).data('value'); + $(this).children('input').each(function() { + $(this).attr('id'); + var div = $(this).attr('id').replace('input_', ''); + $('#' + div).html($(this).val()) + $('#' + div).show(); + $(this).remove(); + }); + }); + + }, + _hide: function() { - $('.stammdaten_form').find('input, select').attr('readonly', true); + var stammdatenform = $('.stammdaten_form'); + stammdatenform.find('select').attr('disabled', true); + + $('.stammdaten').each(function(){ + var id = $(this).attr('id'); + var div = $('
'); + div.attr('id', id); + div.addClass('stammdaten'); + div.html($(this).val()); + $(this).parent('td').html(div); + }); + + $('.kontakt_input').each(function(){ + $(this).parent('td').children('span').show(); + $(this).remove(); + }); + + $('.adresse_input').each(function(){ + $(this).parent('div').children('div').show(); + $(this).remove(); + }); $('.editActionStammdaten').hide(); $('.editStammdaten').show(); @@ -76,9 +145,56 @@ var Stammdaten = { _show: function() { - $('.stammdaten_form').find('input, select').attr('readonly', false); + $('.stammdaten').each(function() { + var id = $(this).attr('id'); + var input = $(''); + input.attr('id', id); + input.addClass('form-control stammdaten'); + input.val($(this).html()); + $(this).parent('td').html(input); + }); + $('.kontakt').each(function() { + var id = $(this).data('id'); + var value = $(this).data('value'); + + $(this).hide(); + + var input = $(''); + input.attr('data-id', id); + input.attr('value', value); + input.addClass('form-control kontakt_input'); + input.val(value); + $(this).parent('td').append(input); + }); + + $('.adresse').each(function() { + var adressenID = $(this).data('value'); + $($(this).children('div').get().reverse()).each(function() { + $(this).hide(); + var id = $(this).attr('id'); + + var input = $(''); + var value = $(this).html(); + + input.attr('id', 'input_' + Stammdaten._getPlaceholder(id) + "_" + adressenID); + input.attr('value', value); + input.attr('placeholder', Stammdaten._getPlaceholder(id).toUpperCase()); + input.addClass('form-control adresse_input'); + input.val(value); + $(this).parent().prepend(input); + }); + }); + + var stammdatenform = $('.stammdaten_form'); + + stammdatenform.find('select').attr('disabled', false); $('.editActionStammdaten').show(); $('.editStammdaten').hide(); + }, + + _getPlaceholder(elementid) + { + return elementid.substr(0, elementid.indexOf("_")); } } \ No newline at end of file From ffec6a5422230a7fc8dde995f45e37dec19db966 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 3 Nov 2022 09:55:38 +0100 Subject: [PATCH 19/49] - stammdaten editierbar --- .../views/system/infocenter/stammdaten.php | 26 +--- public/js/infocenter/stammdaten.js | 139 +++++++++--------- 2 files changed, 73 insertions(+), 92 deletions(-) diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php index 47cf7b253..f143c9c03 100644 --- a/application/views/system/infocenter/stammdaten.php +++ b/application/views/system/infocenter/stammdaten.php @@ -6,43 +6,36 @@
titelpre ?>
p->t('person','vorname')) ?>
vorname ?>
- -
p->t('person','nachname')) ?>
nachname ?>
-
p->t('person','titelpost')) ?>
titelpost ?>
-
p->t('person','geburtsdatum')) ?>
gebdatum), 'd.m.Y') ?>
-
p->t('person','svnr')) ?>
svnr ?>
-
p->t('person','geburtsort')) ?>
gebort ?>
-
@@ -135,10 +127,7 @@ kontakt; endif; - /*if (($kontakt->kontakttyp === 'telefon' || $kontakt->kontakttyp === 'mobil')) - echo ''; - else*/ - echo $kontakt->kontakt; + echo $kontakt->kontakt; if ($kontakt->kontakttyp === 'email'): ?> @@ -155,16 +144,13 @@ -
-
strasse ?>
- +
+
strasse ?>
-
plz ?>
- +
plz ?>
-
ort ?>
- - +
ort ?>
+ nationkurztext)): ?> '); - input.attr('id', id); - input.addClass('form-control stammdaten'); + input.attr('id', id + '_input'); + input.addClass('form-control stammdaten_input'); input.val($(this).html()); - $(this).parent('td').html(input); + $(this).hide(); + $(this).parent('td').append(input); }); $('.kontakt').each(function() { @@ -169,17 +125,17 @@ var Stammdaten = { }); $('.adresse').each(function() { - var adressenID = $(this).data('value'); + var adressenID = $(this).data('id'); $($(this).children('div').get().reverse()).each(function() { $(this).hide(); - var id = $(this).attr('id'); - + var type = $(this).data('type'); + var value = $(this).data('value'); var input = $(''); - var value = $(this).html(); - input.attr('id', 'input_' + Stammdaten._getPlaceholder(id) + "_" + adressenID); + input.attr('data-type', type); + input.attr('id', type + '_' + adressenID); input.attr('value', value); - input.attr('placeholder', Stammdaten._getPlaceholder(id).toUpperCase()); + input.attr('placeholder', type.toUpperCase()); input.addClass('form-control adresse_input'); input.val(value); $(this).parent().prepend(input); @@ -193,8 +149,47 @@ var Stammdaten = { $('.editStammdaten').hide(); }, - _getPlaceholder(elementid) + _updated: function() { - return elementid.substr(0, elementid.indexOf("_")); - } + $('.kontakt_input').each(function() { + var span = $(this).parent('td').children('span'); + var value = $(this).val(); + + var oldSpanValue = span.data('value'); + span.data('value', value); + var newhtml = span.html().replace(oldSpanValue, value); + span.html(newhtml); + if (span.hasClass('email')) + span.find('a').attr('href', 'mailto:' + value); + + span.show(); + $(this).remove(); + }); + + $('.adresse').each(function() { + $(this).children('input').each(function() { + var value = $(this).val(); + var type = $(this).data('type'); + var div = $('div[data-type="' + type + '"]'); + div.data('value', value); + div.html(value); + div.show(); + $(this).remove(); + }); + }); + + $('.stammdaten_input').each(function() { + var div = $(this).parent('td').children('div'); + var value = $(this).val(); + div.html(value); + div.show(); + $(this).remove(); + }); + + var stammdatenform = $('.stammdaten_form'); + stammdatenform.find('select').attr('disabled', true); + + $('.editActionStammdaten').hide(); + $('.editStammdaten').show(); + }, } \ No newline at end of file From 71c953bac77b809cc651cd4380c4d7f17a0b953a Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Thu, 3 Nov 2022 12:04:46 +0100 Subject: [PATCH 20/49] studentenmeldung: standort_code is retrieved and set in xml correctly (first prestudent, then studiengang) --- vilesci/bis/studentenmeldung.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index 140108a12..01d2dc766 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -271,7 +271,8 @@ if (CAMPUS_NAME == 'FH Technikum Wien' && $stg_kz==10006) DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat, public.tbl_prestudent.foerderrelevant as pre_foerderrelevant, - public.tbl_studiengang.foerderrelevant as stg_foerderrelevant + public.tbl_studiengang.foerderrelevant as stg_foerderrelevant, + COALESCE(tbl_prestudent.standort_code, tbl_studiengang.standort_code) AS bis_standort_code FROM public.tbl_student JOIN public.tbl_benutzer ON(student_uid=uid) @@ -295,7 +296,8 @@ elseif ($stg_kz == 'alleBaMa') DISTINCT ON(tbl_student.studiengang_kz, matrikelnr, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat, public.tbl_prestudent.foerderrelevant as pre_foerderrelevant, - public.tbl_studiengang.foerderrelevant as stg_foerderrelevant + public.tbl_studiengang.foerderrelevant as stg_foerderrelevant, + COALESCE(tbl_prestudent.standort_code, tbl_studiengang.standort_code) AS bis_standort_code FROM public.tbl_student JOIN public.tbl_benutzer ON(student_uid=uid) @@ -327,7 +329,8 @@ else DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat, public.tbl_prestudent.foerderrelevant as pre_foerderrelevant, - public.tbl_studiengang.foerderrelevant as stg_foerderrelevant + public.tbl_studiengang.foerderrelevant as stg_foerderrelevant, + COALESCE(tbl_prestudent.standort_code, tbl_studiengang.standort_code) AS bis_standort_code FROM public.tbl_student JOIN public.tbl_benutzer ON(student_uid=uid) @@ -1615,7 +1618,7 @@ function GenerateXMLStudentBlock($row) if(!$ausserordentlich) { $datei.=" - ".$row->standort_code.""; + ".$row->bis_standort_code.""; } /* * BMWFFoerderrung derzeit fuer alle Studierende auf Ja gesetzt From 8df802b74a34c394df2178b48608476bb0944500 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 8 Nov 2022 14:45:02 +0100 Subject: [PATCH 21/49] - die Abteilung und das Unternehmen werden im CSV angezeigt --- include/mitarbeiter.class.php | 28 +++++++++++++++++++ include/organisationseinheit.class.php | 37 ++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/include/mitarbeiter.class.php b/include/mitarbeiter.class.php index b7511a5ad..df5557454 100644 --- a/include/mitarbeiter.class.php +++ b/include/mitarbeiter.class.php @@ -1705,5 +1705,33 @@ class mitarbeiter extends benutzer } } + public function getMitarbeiterKostenstelle($von, $bis, $uid = null) + { + if (is_null($uid)) + $uid = $this->uid; + + $qry = " + SELECT o.oe_kurzbz AS standardkostenstelle, o.bezeichnung + FROM public.tbl_benutzerfunktion bf + JOIN public.tbl_organisationseinheit o USING(oe_kurzbz) + WHERE bf.funktion_kurzbz = 'kstzuordnung' + AND (bf.datum_bis IS NULL OR datum_bis >= ". $this->db_add_param($von). ") + AND (bf.datum_von IS NULL OR datum_von <= ". $this->db_add_param($bis). ") + AND bf.uid = ". $this->db_add_param($uid); + + if ($result = $this->db_query($qry)) + { + while($row = $this->db_fetch_object($result)) + { + $obj = new StdClass(); + $obj->oekurzbz = $row->standardkostenstelle; + $obj->bezeichnung = $row->bezeichnung; + + $this->result []= $obj; + } + return true; + } + } + } ?> diff --git a/include/organisationseinheit.class.php b/include/organisationseinheit.class.php index d58cfd327..1a2e0ca16 100644 --- a/include/organisationseinheit.class.php +++ b/include/organisationseinheit.class.php @@ -938,5 +938,42 @@ class organisationseinheit extends basis_db return false; } } + + public function getOERoot($oe_kurzbz) + { + $qry = ' + WITH RECURSIVE organizations(rid, oe_kurzbz, oe_parent_kurzbz) AS + ( + SELECT 1 AS rid, o.oe_kurzbz, o.oe_parent_kurzbz + FROM public.tbl_organisationseinheit o + WHERE o.oe_kurzbz = '. $this->db_add_param($oe_kurzbz). ' + UNION ALL + SELECT rid + 1 AS rid, oe.oe_kurzbz, oe.oe_parent_kurzbz + FROM organizations org, public.tbl_organisationseinheit oe + WHERE oe.oe_kurzbz = org.oe_parent_kurzbz + AND oe.aktiv = TRUE + ) + SELECT oe_kurzbz + FROM organizations orgs + ORDER BY rid DESC + LIMIT 1 + '; + + if($this->db_query($qry)) + { + if($row = $this->db_fetch_object()) + { + $this->oe_kurzbz = $row->oe_kurzbz; + return true; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Organisationseinheiten'; + return false; + } + } + + } ?> From 119a521913bfa5e81e7ea0eb75a0c646d4d1165b Mon Sep 17 00:00:00 2001 From: ma0048 Date: Fri, 11 Nov 2022 10:56:36 +0100 Subject: [PATCH 22/49] - standort kurzbz im fas anzeigen, wenn die bezeichnung null ist --- .../mitarbeiterdetailoverlay.xul.php | 17 +++++++++++++---- rdf/standort.rdf.php | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/content/mitarbeiter/mitarbeiterdetailoverlay.xul.php b/content/mitarbeiter/mitarbeiterdetailoverlay.xul.php index 2cda649a2..7f2963013 100644 --- a/content/mitarbeiter/mitarbeiterdetailoverlay.xul.php +++ b/content/mitarbeiter/mitarbeiterdetailoverlay.xul.php @@ -255,13 +255,22 @@ echo '';
+
'; +} //REIHUNGSTEST STARTSEITE (nach Login) -if (isset($prestudent_id)) +elseif (isset($prestudent_id)) { $prestudent = new prestudent($prestudent_id); $stg_obj = new studiengang($prestudent->studiengang_kz); diff --git a/include/reihungstest.class.php b/include/reihungstest.class.php index 0140816ab..30d603afc 100644 --- a/include/reihungstest.class.php +++ b/include/reihungstest.class.php @@ -60,6 +60,9 @@ class reihungstest extends basis_db public $anmeldedatum; // date public $teilgenommen; // boolean public $punkte; // numeric + + public $zugangs_ueberpruefung = false; //boolean + public $zugangscode; //smallint /** @@ -114,6 +117,8 @@ class reihungstest extends basis_db $this->stufe = $row->stufe; $this->anmeldefrist = $row->anmeldefrist; $this->aufnahmegruppe_kurzbz = $row->aufnahmegruppe_kurzbz; + $this->zugangs_ueberpruefung = $this->db_parse_bool($row->zugangs_ueberpruefung); + $this->zugangscode = $row->zugangscode; return true; } @@ -229,7 +234,7 @@ class reihungstest extends basis_db $qry = 'BEGIN; INSERT INTO public.tbl_reihungstest (studiengang_kz, ort_kurzbz, anmerkung, datum, uhrzeit, insertamum, insertvon, updateamum, updatevon, max_teilnehmer, oeffentlich, freigeschaltet, - studiensemester_kurzbz, stufe, anmeldefrist, aufnahmegruppe_kurzbz) VALUES('. + studiensemester_kurzbz, stufe, anmeldefrist, aufnahmegruppe_kurzbz, zugangs_ueberpruefung, zugangscode) VALUES('. $this->db_add_param($this->studiengang_kz, FHC_INTEGER).', '. $this->db_add_param($this->ort_kurzbz).', '. $this->db_add_param($this->anmerkung).', '. @@ -243,7 +248,9 @@ class reihungstest extends basis_db $this->db_add_param($this->studiensemester_kurzbz).','. $this->db_add_param($this->stufe, FHC_INTEGER).','. $this->db_add_param($this->anmeldefrist).','. - $this->db_add_param($this->aufnahmegruppe_kurzbz).');'; + $this->db_add_param($this->aufnahmegruppe_kurzbz). ',' . + $this->db_add_param($this->zugangs_ueberpruefung, FHC_BOOLEAN).','. + $this->db_add_param($this->zugangscode) . ');'; } else { @@ -261,7 +268,9 @@ class reihungstest extends basis_db 'studiensemester_kurzbz='.$this->db_add_param($this->studiensemester_kurzbz).', '. 'stufe='.$this->db_add_param($this->stufe, FHC_INTEGER).', '. 'anmeldefrist='.$this->db_add_param($this->anmeldefrist).', '. - 'aufnahmegruppe_kurzbz='.$this->db_add_param($this->aufnahmegruppe_kurzbz).' '. + 'aufnahmegruppe_kurzbz='.$this->db_add_param($this->aufnahmegruppe_kurzbz).', '. + 'zugangs_ueberpruefung='.$this->db_add_param($this->zugangs_ueberpruefung, FHC_BOOLEAN).', '. + 'zugangscode='.$this->db_add_param($this->zugangscode).' '. 'WHERE reihungstest_id='.$this->db_add_param($this->reihungstest_id, FHC_INTEGER, false).';'; } diff --git a/locale/de-AT/testtool.php b/locale/de-AT/testtool.php index dbafe21e9..60a625c99 100644 --- a/locale/de-AT/testtool.php +++ b/locale/de-AT/testtool.php @@ -79,5 +79,8 @@ $this->phrasen['testtool/einfuehrungsText']='
'; $this->phrasen['testtool/prueflingGesperrt']='Bitte kontaktieren Sie die Reihungstestaufsicht!'; +$this->phrasen['testtool/freischaltcode']='Freischaltcode'; +$this->phrasen['testtool/freischalttext']='Ihren Freischaltcode erhalten Sie am Tag des Reihungstests nach erfolgter Einführung im ZOOM-Meeting (siehe Leitfaden) von der Aufsicht.
Wir wünschen Ihnen viel Erfolg.'; + ?> diff --git a/locale/en-US/testtool.php b/locale/en-US/testtool.php index 473ac1e0d..5524d4304 100644 --- a/locale/en-US/testtool.php +++ b/locale/en-US/testtool.php @@ -51,4 +51,6 @@ $this->phrasen['testtool/keinPrueflingseintragVorhanden']='No candidate entry av $this->phrasen['testtool/fuerFolgendeStgAngemeldet']='You have applied for the following degree programs:'; $this->phrasen['testtool/invalideGebiete']='One or more question areas incorrect!
Please inform an assisting person.'; $this->phrasen['testtool/prueflingGesperrt']='Please contact the placement test supervisor!'; +$this->phrasen['testtool/freischaltcode']='Activation code'; +$this->phrasen['testtool/freischalttext']='You will receive your activation code on the day of the placement test after the introduction in the ZOOM meeting (see guideline) from the supervisor.
We wish you good luck.' ?> \ No newline at end of file diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index 9d89de0d1..57f037d14 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -29,6 +29,7 @@ require_once('dbupdate_3.4/example2.php'); */ require_once('dbupdate_3.4/26173_index_webservicelog.php'); +require_once('dbupdate_3.4/24682_reihungstest_zugangscode_fuer_login.php'); // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/dbupdate_3.4/24682_reihungstest_zugangscode_fuer_login.php b/system/dbupdate_3.4/24682_reihungstest_zugangscode_fuer_login.php new file mode 100644 index 000000000..e522df339 --- /dev/null +++ b/system/dbupdate_3.4/24682_reihungstest_zugangscode_fuer_login.php @@ -0,0 +1,15 @@ +db_query("SELECT zugangs_ueberpruefung FROM public.tbl_reihungstest LIMIT 1")) +{ + $qry = "ALTER TABLE public.tbl_reihungstest ADD COLUMN zugangs_ueberpruefung boolean NOT NULL DEFAULT false; + ALTER TABLE public.tbl_reihungstest ADD COLUMN zugangscode smallint DEFAULT NULL;"; + + if(!$db->db_query($qry)) + echo 'public.tbl_reihungstest: '.$db->db_last_error().'
'; + else + echo '
public.tbl_reihungstest: Spalte zugangs_ueberpruefung und zugangscode hinzugefuegt'; +} \ No newline at end of file diff --git a/vilesci/stammdaten/reihungstestverwaltung.php b/vilesci/stammdaten/reihungstestverwaltung.php index 4db82d102..6fac37be7 100644 --- a/vilesci/stammdaten/reihungstestverwaltung.php +++ b/vilesci/stammdaten/reihungstestverwaltung.php @@ -847,6 +847,12 @@ if(isset($_GET['excel'])) if ($('.ort_listitem').length == 0 && $('#max_teilnehmer').val() == '' && $('#ort').val() == '') confirm('Wenn der Reihungstest "Öffentlich" ist, sollten Räume zugeteilt sein, oder "Max TeilnehmerInnen" gesetzt sein'); } + + if ($('#zugangs_ueberpruefung').is(":checked") && $('#zugangcode').val() == '') + { + alert('Wenn die Zugangsüberprüfung aktiviert ist, ist ein Zugangscode verpflichtend.'); + return false; + } }); if ($('#oeffentlich').is(":checked") && $('.ort_listitem').length == 0 && $('#max_teilnehmer').val() == '' && $('#ort').val() == '') @@ -1396,6 +1402,12 @@ if(isset($_POST['speichern']) || isset($_POST['kopieren'])) $error = true; } } + + if (isset($_POST['zugangs_ueberpruefung']) && $_POST['zugangcode'] === '') + { + $messageError .= '

Der Zugangscode muss ausgefüllt sein, wenn die Zugangsüberprüfung aktiviert ist.

'; + $error = true; + } if(!$error) { @@ -1407,6 +1419,8 @@ if(isset($_POST['speichern']) || isset($_POST['kopieren'])) $reihungstest->stufe = filter_input(INPUT_POST, 'stufe', FILTER_VALIDATE_INT); $reihungstest->aufnahmegruppe_kurzbz = filter_input(INPUT_POST, 'aufnahmegruppe'); $reihungstest->anmeldefrist = $datum_obj->formatDatum($_POST['anmeldefrist']); + $reihungstest->zugangs_ueberpruefung = false; + $reihungstest->zugangscode = null; } else { @@ -1421,6 +1435,8 @@ if(isset($_POST['speichern']) || isset($_POST['kopieren'])) $reihungstest->anmeldefrist = $datum_obj->formatDatum($_POST['anmeldefrist']); $reihungstest->updateamum = date('Y-m-d H:i:s'); $reihungstest->updatevon = $user; + $reihungstest->zugangs_ueberpruefung = isset($_POST['zugangs_ueberpruefung']); + $reihungstest->zugangscode = ($_POST['zugangcode'] === '' ? null : $_POST['zugangcode']); } $reihungstest->studiengang_kz = $_POST['studiengang_kz']; //$reihungstest->ort_kurzbz = $_POST['ort_kurzbz']; @@ -2504,6 +2520,18 @@ $studienplaene_list = implode(',', array_keys($studienplaene_arr)); (Kurz vor Testbeginn aktivieren) + + Zugangsüberprüfung + + zugangs_ueberpruefung ? 'checked="checked"' : '' ?>> + + + + Zugangscode + + (Verpflichtend, wenn die Zugangsüberprüfung aktiviert ist) + +   From ad19e0ed75f93a1f46b8687148a1ef225f3f57ba Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 12 Dec 2022 07:55:36 +0100 Subject: [PATCH 37/49] - im fas die unr hinzugefuegt --- content/lvplanung/lehrveranstaltungoverlay.xul.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/lvplanung/lehrveranstaltungoverlay.xul.php b/content/lvplanung/lehrveranstaltungoverlay.xul.php index 4fde1fcc3..0ebc0b178 100644 --- a/content/lvplanung/lehrveranstaltungoverlay.xul.php +++ b/content/lvplanung/lehrveranstaltungoverlay.xul.php @@ -216,6 +216,10 @@ echo ' +