From 6d1c926ec0eb22d7cea95e20b508a98d9b8018d8 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 29 Mar 2022 13:56:00 +0200 Subject: [PATCH 001/138] Anzeige AllinSaldo in Zeitaufzeichnung --- cis/private/tools/zeitaufzeichnung.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index ba57b442f..74c2678bc 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -1379,7 +1379,8 @@ if ($projekt->getProjekteMitarbeiter($user, true)) } } echo ''; - echo '

'; + echo '
'; + echo '

'; if (!$adminView) { From 9bf20dd7a41d4667bb208cfa501bd660e6a0efcb Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 28 Apr 2022 07:54:43 +0200 Subject: [PATCH 002/138] neue Funktion: getLastVerwendungZapflicht --- include/bisverwendung.class.php | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/include/bisverwendung.class.php b/include/bisverwendung.class.php index ce6a557b1..afcc271f8 100644 --- a/include/bisverwendung.class.php +++ b/include/bisverwendung.class.php @@ -865,5 +865,68 @@ class bisverwendung extends basis_db return false; } } + + /** + * Lädt die letzte zeitaufzeichnungspflichtige Bisverwendung + * @param $uid UID des Mitarbeiters + * @return true wenn ok, false wenn Fehler + */ + public function getLastBisZAPflicht($uid) + { + $datetime = new DateTime($stichtag); + $stichtag = $datetime->format('Y-m-d'); + $bismeldung_jahr = $datetime->format('Y'); + + $qry = ' + SELECT + * + FROM + bis.tbl_bisverwendung + WHERE + mitarbeiter_uid = '. $this->db_add_param($uid).' + AND + zeitaufzeichnungspflichtig = true + ORDER BY ende DESC NULLS FIRST LIMIT 1 + '; + + if($this->db_query($qry)) + { + while($row = $this->db_fetch_object()) + { + + $obj = new bisverwendung(); + + $obj->bisverwendung_id = $row->bisverwendung_id; + $obj->ba1code = $row->ba1code; + $obj->ba2code = $row->ba2code; + $obj->beschausmasscode = $row->beschausmasscode; + $obj->verwendung_code = $row->verwendung_code; + $obj->hauptberufcode = $row->hauptberufcode; + $obj->hauptberuflich = $row->hauptberuflich; + $obj->habilitation = $row->habilitation; + $obj->beginn = $row->beginn; + $obj->ende = $row->ende; + $obj->updatevon = $row->updatevon; + $obj->updateamum = $row->updateamum; + $obj->insertamum = $row->insertamum; + $obj->insertvon = $row->insertvon; + $obj->vertragsstunden = $row->vertragsstunden; + $obj->dv_art = $row->dv_art; + $obj->inkludierte_lehre = $row->inkludierte_lehre; + $obj->azgrelevant = $row->azgrelevant; + $obj->homeoffice = $row->homeoffice; + + $this->result[] = $obj; + } + return true; + } + else + { + $this->errormsg = 'Fehler bei der Datenbankabfrage'; + return false; + } + } + + } ?> From b6cc084799e0bf6fd2fdcc55019b4963e6683365 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 28 Apr 2022 11:46:45 +0200 Subject: [PATCH 003/138] Adaptierung Funktion getLastBisZAPflicht() --- include/bisverwendung.class.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/bisverwendung.class.php b/include/bisverwendung.class.php index afcc271f8..e5314963b 100644 --- a/include/bisverwendung.class.php +++ b/include/bisverwendung.class.php @@ -873,10 +873,6 @@ class bisverwendung extends basis_db */ public function getLastBisZAPflicht($uid) { - $datetime = new DateTime($stichtag); - $stichtag = $datetime->format('Y-m-d'); - $bismeldung_jahr = $datetime->format('Y'); - $qry = ' SELECT * From c87aee0ddf226a6f91ae842c603eb9e007b0ec22 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 24 Jun 2022 08:10:51 +0200 Subject: [PATCH 004/138] Zeitsperre Umbau Mail auf Sanchomail, Anzeige Zeitsaldo in Sanchomail, Adpatierungen Urlaub --- cis/private/profile/zeitsperre_resturlaub.php | 210 ++++++++++++++++-- include/zeitsperre.class.php | 49 +++- locale/de-AT/urlaubstool.php | 7 +- locale/en-US/urlaubstool.php | 7 + 4 files changed, 249 insertions(+), 24 deletions(-) diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index 8e449b12d..b5118dce4 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -31,6 +31,7 @@ require_once('../../../include/person.class.php'); require_once('../../../include/benutzer.class.php'); require_once('../../../include/mitarbeiter.class.php'); require_once('../../../include/mail.class.php'); +require_once('../../../include/sancho.inc.php'); require_once('../../../include/benutzerberechtigung.class.php'); require_once('../../../include/phrasen.class.php'); require_once('../../../include/zeitaufzeichnung.class.php'); @@ -65,6 +66,7 @@ if(isset($_GET['uid'])) die($p->t('global/FuerDieseAktionBenoetigenSieAdministrationsrechte')); } } + $datum_obj = new datum(); $ma= new mitarbeiter(); @@ -119,7 +121,8 @@ $( document ).ready(function() { for(i in addon) { - addon[i].init("cis/private/profile/zeitsperre_resturlaub.php", {uid:\''.$uid.'\', holiDays: holiDays}); + + addon[i].init("cis/private/profile/zeitsperre_resturlaub.php", {uid:\''.$uid.'\', holiDays: holiDays}); } } @@ -158,6 +161,63 @@ $( document ).ready(function() } return [true, ""]; } + +function AddonCaseTimeLoadZeitsaldo(uid) +{ + $.ajax({ + type: "GET", + dataType: "json", + url: "'.APP_ROOT.'/addons/casetime/vilesci/zeitsaldo.php?uid="+uid, + success: function (result) + { + if (result===false) + { + $("#zeitsaldo").html("error"); + } + else + { + var DatumAktuell = new Date(); + //var DatumAktuell = new Date(2016,0,11); + var MonatAktuell = DatumAktuell.getMonth()+1; + var MonatLetztes = MonatAktuell - 1; + var JahrAktuell = DatumAktuell.getFullYear(); + var JahrLetztes = DatumAktuell.getFullYear(); + var VorJahr = JahrAktuell -1; + if (MonatLetztes == 0) + { + MonatLetztes = 12; + JahrLetztes = JahrAktuell - 1; + } + var MonatVorLetztes = MonatLetztes -1; + var JahrVorLetztes = JahrLetztes; + if (MonatVorLetztes == 0) + { + MonatVorLetztes = 12; + JahrVorLetztes = JahrLetztes -1; + } + + + var zahl = parseFloat(result); + if (zahl > 0) + var faktor = 1; + else + var faktor = -1; + zahl = zahl * faktor; + var std = Math.floor(zahl); + var min = (zahl-Math.floor(zahl))*60; + min = Math.round(min); + var std_anzeigealt = std+"h:"+min+"m"; + + $(\'input[name="zeitsaldo"]\').val("Aktueller Stundensaldo: "+result +" Stunden ("+std_anzeigealt+")"); + + } + }, + error: function(){ + alert("Error Casetime Load"); + } + }); +} + '; ?> @@ -339,12 +399,16 @@ function showHideStudeDropDown() updateamum = date('Y-m-d H:i:s'); $zeitsperre->updatevon = $uid; + // Zeitsperretyp Beschreibung + $zeitsperre->loadZeitsperretyp($zeitsperre->zeitsperretyp_kurzbz); + $zeitsperre->beschreibung = $zeitsperre->result[0]->beschreibung; + if($zeitsperre->save()) { echo "

".$p->t('global/erfolgreichgespeichert')."

"; if(URLAUB_TOOLS) { - if($zeitsperre->new && $zeitsperre->zeitsperretyp_kurzbz=='Urlaub') + //Beim Anlegen von neuen Urlauben oder neuem Zeitausgleich wird ein Mail an den Vorgesetzten versendet + if($zeitsperre->new && ($zeitsperre->zeitsperretyp_kurzbz=='Urlaub' || $zeitsperre->zeitsperretyp_kurzbz == 'ZA') + || !$zeitsperre->new && $zeitsperre->zeitsperretyp_kurzbz == 'ZA') { //Beim Anlegen von neuen Urlauben wird ein Mail an den Vorgesetzten versendet um diesen Freizugeben $prsn = new person(); - $vorgesetzter = $ma->getVorgesetzte($uid); + $vorgesetzter = $ma->getVorgesetzte($uid); + if($vorgesetzter) { $to=''; @@ -536,16 +607,73 @@ if(isset($_GET['type']) && ($_GET['type']=='edit_sperre' || $_GET['type']=='new_ else $jahr = $datum_obj->formatDatum($zeitsperre->vondatum, 'Y'); - $message = "Dies ist eine automatische Mail! \n". - "$benutzer->nachname $benutzer->vorname hat einen neuen Urlaub eingetragen:\n". - "$zeitsperre->bezeichnung von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y')." bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y')."\n\n". - "Sie können diesen unter folgender Adresse freigeben:\n". - APP_ROOT."cis/private/profile/urlaubsfreigabe.php?uid=$uid&year=".$jahr; - $from='vilesci@'.DOMAIN; - $mail = new mail($to, $from, 'Freigabeansuchen', $message); - if($mail->send()) + // Wenn ein neuer Urlaub eingetragen wurde, Freigabemail-Text + if ($zeitsperre->zeitsperretyp_kurzbz=='Urlaub') { - echo "
".$p->t('urlaubstool/freigabemailWurdeVersandt',array($fullName)).""; + if ($zeitsperre->new) + { + $mailSancho = " $benutzer->nachname $benutzer->vorname hat einen neuen Urlaub eingetragen:
"; + + $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). + " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). + " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'). + ".
Sie können diesen unter folgender Adresse freigeben:

". + " Link Urlaubstool "; + + $subject = "Freigabeansuchen"; + + $zeitsaldo = ''; + } + + } + + // Wenn ein Zeitausgleich eingetragen wurde... + if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA') + { + // ...Mail-Text für neuen Zeitausgleich + if ($zeitsperre->new) + { + $mailSancho = " $benutzer->nachname $benutzer->vorname hat einen neuen Zeitausgleich eingetragen:
"; + + $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). + " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). + " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); + + $subject = $p->t('urlaubstool/zeitausgleichNeu'); + } + // ...Mail-Text für geaenderten Zeitausgleich + else + { + $mailSancho = " $benutzer->nachname $benutzer->vorname hat den Zeitausgleich wie folgt geändert:
" ; + + $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). + " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). + " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); + + $subject = $subject = $p->t('urlaubstool/zeitausgleichGeaendert'); + } + } + + $from='vilesci@'.DOMAIN; + + //Sanchomail mit Vorlage Sancho Mail Zeitausgleich + $template_data = array( + 'vorgesetzter' => $fullName, + 'textZeitausgleich' => $mailSancho, + 'Saldo'=> $zeitsaldo + ); + + if (sendSanchoMail('Sancho_Content_Zeitausgleich', $template_data, $to, $subject)) + { + if ($zeitsperre->zeitsperretyp_kurzbz=='Urlaub') + { + echo "
". $p->t('urlaubstool/freigabemailWurdeVersandt', array($fullName)). ""; + } + + if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA') + { + echo "
". $p->t('urlaubstool/VorgesetzteInformiert', array($fullName)). ""; + } } else { @@ -572,9 +700,13 @@ if((isset($_GET['type']) && $_GET['type']=='delete_sperre' && isset($_GET['infor $zeitsperre = new zeitsperre(); $zeitsperre->load($_GET['id']); + $zeitsperre->loadZeitsperretyp($zeitsperre->zeitsperretyp_kurzbz); + $zeitsperre->beschreibung = $zeitsperre->result[0]->beschreibung; + $vondatum = $zeitsperre->getVonDatum(); $bisdatum = $zeitsperre->getBisDatum(); + if(!$zeitsperre->delete($_GET['id'])) echo $zeitsperre->errormsg; @@ -604,16 +736,43 @@ if((isset($_GET['type']) && $_GET['type']=='delete_sperre' && isset($_GET['infor $benutzer = new benutzer(); $benutzer->load($uid); - $message = $p->t('urlaubstool/diesIstEineAutomatischeMail')."\n". - $p->t('urlaubstool/xHatUrlaubGeloescht',array($benutzer->nachname,$benutzer->vorname)).":\n"; + + if ($zeitsperre->zeitsperretyp_kurzbz == 'Urlaub') + { + $mailSancho = $p->t('urlaubstool/xHatUrlaubGeloescht', array($benutzer->nachname, $benutzer->vorname)).":
"; + + $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). + " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). + " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); + + // $subject = $p->t('urlaubstool/freigegebenerUrlaubGeloescht'); + $subject = $p->t('urlaubstool/UrlaubGeloescht'); - $message.= $p->t('urlaubstool/von')." ".date("d.m.Y", strtotime($vondatum))." ".$p->t('urlaubstool/bis')." ".date("d.m.Y", strtotime($bisdatum))."\n"; + } + + if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA') + { + $mailSancho = $p->t('urlaubstool/xHatZeitausgleichGeloescht', array($benutzer->nachname, $benutzer->vorname)) . ":
"; + + $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). + " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). + " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); + + $subject = $p->t('urlaubstool/zeitausgleichGeloescht'); + + } + + $template_data = array( + 'vorgesetzter' => $fullName, + 'textZeitausgleich' => $mailSancho, + 'Saldo' => '' + ); - $mail = new mail($to, 'vilesci@'.DOMAIN,$p->t('urlaubstool/freigegebenerUrlaubGeloescht'), $message); - if($mail->send()) + if (sendSanchoMail('Sancho_Content_Zeitausgleich', $template_data, $to, $subject)) { + echo "" . $p->t('global/erfolgreichgelöscht') . '
'; echo "
".$p->t('urlaubstool/VorgesetzteInformiert',array($fullName)).""; } else @@ -621,6 +780,7 @@ if((isset($_GET['type']) && $_GET['type']=='delete_sperre' && isset($_GET['infor echo "
".$p->t('urlaubstool/fehlerBeimSendenAufgetreten',array($fullName))."!"; } } + else { $vgmail="
".$p->t('urlaubstool/konnteKeinFreigabemailVersendetWerden').""; @@ -632,6 +792,7 @@ if(isset($_GET['type']) && $_GET['type']=='delete_sperre' && !isset($_GET['infor { $zeit = new zeitsperre(); $zeit->load($_GET['id']); + //pruefen ob die person die den datensatz loeschen will auch der //besitzer dieses datensatzes ist if($zeit->mitarbeiter_uid==$uid) @@ -698,7 +859,7 @@ if(count($zeit->result)>0) $content_table.="".$p->t('zeitsperre/edit').""; if ($row->vondatum < $gesperrt_bis AND in_array($row->zeitsperretyp_kurzbz,$typen_arr)) $content_table .= ' '; - else if($row->vondatum>=date("Y-m-d",time()) && $row->zeitsperretyp_kurzbz=='Urlaub') + else if($row->vondatum>=date("Y-m-d",time()) && ($row->zeitsperretyp_kurzbz=='Urlaub' || $row->zeitsperretyp_kurzbz == 'ZA')) { $content_table.="\n".$p->t('zeitsperre/loeschen').""; } @@ -836,6 +997,12 @@ if($result = $db->db_query($qry)) } $content_form.= ''; +//visible field für Zeitsaldo in Mail ZA +$content_form.= ''; + +//$content_form.= ''.$p->t('global/bezeichnung').' +//'; + $content_form.= "".$p->t('urlaubstool/erreichbarkeit')."'; + + $content_form.= ''; + + if(isset($_GET['type']) && $_GET['type']=='edit') $content_form.= ""; @@ -875,6 +1046,7 @@ echo ''; ?> + showHideStudeDropDown();'; ?> diff --git a/include/zeitsperre.class.php b/include/zeitsperre.class.php index 0e737eaf0..efae1c91d 100644 --- a/include/zeitsperre.class.php +++ b/include/zeitsperre.class.php @@ -551,13 +551,13 @@ class zeitsperre extends basis_db public function getVonBis($uid, $von, $bis, $zeitsperretyp_kurzbz = null) { $qry = ' - SELECT + SELECT zeitsperre_id, zeitsperretyp_kurzbz, vondatum, vonstunde, bisdatum, bisstunde - FROM + FROM campus.tbl_zeitsperre LEFT JOIN campus.tbl_zeitsperretyp USING (zeitsperretyp_kurzbz) - WHERE - mitarbeiter_uid = '. $this->db_add_param($uid). ' + WHERE + mitarbeiter_uid = '. $this->db_add_param($uid). ' AND ( (vondatum BETWEEN '.$this->db_add_param($von).' AND '.$this->db_add_param($bis).') OR @@ -592,5 +592,46 @@ class zeitsperre extends basis_db return true; } } + + /** + * Laedt einen Zeitsperretyp. + * + * @param $zeitsperretyp_kurzbz + * @return Gibt Zeitsperretyp als Objekt zurück. True wenn ok, false im Fehlerfall. + */ + public function loadZeitsperretyp($zeitsperretyp_kurzbz) + { + if(!is_string($zeitsperretyp_kurzbz)) + { + $this->errormsg = 'zeitsperretyp muß ein String sein'; + return false; + } + + $qry = "SELECT * FROM campus.tbl_zeitsperretyp WHERE zeitsperretyp_kurzbz = ". $this->db_add_param($zeitsperretyp_kurzbz); + + if(!$this->db_query($qry)) + { + $this->errormsg = 'Fehler beim Laden des Datensatzes'; + return false; + } + + if($row = $this->db_fetch_object()) + { + $obj = new StdClass(); + $obj->zeitsperretyp_kurzbz = $row->zeitsperretyp_kurzbz; + $obj->beschreibung = $row->beschreibung; + $obj->farbe = $row->farbe; + + $this->result[]= $obj; + } + else + { + $this->errormsg = 'Zeitsperretyp konnte nicht geladen werden'; + return false; + } + + return true; + } + } ?> diff --git a/locale/de-AT/urlaubstool.php b/locale/de-AT/urlaubstool.php index 6d6edde09..5001ed725 100644 --- a/locale/de-AT/urlaubstool.php +++ b/locale/de-AT/urlaubstool.php @@ -37,9 +37,14 @@ $this->phrasen['urlaubstool/sieKoennenDiesenUnterFolgenderAdresseFreigeben']='Si $this->phrasen['urlaubstool/freigabeansuchenUrlaub']='Freigabeansuchen Urlaub'; $this->phrasen['urlaubstool/freigabeFehlt']='Urlaub wurde noch nicht freigegeben'; $this->phrasen['urlaubstool/freigegebenerUrlaubGeloescht']='Bereits Freigegebener Urlaub wurde gelöscht'; +$this->phrasen['urlaubstool/UrlaubGeloescht']='Urlaub wurde gelöscht'; +$this->phrasen['urlaubstool/zeitausgleichNeu']='Zeitausgleich wurde neu eingetragen'; +$this->phrasen['urlaubstool/zeitausgleichGeaendert']='Zeitausgleich wurde geändert'; +$this->phrasen['urlaubstool/zeitausgleichGeloescht']='Zeitausgleich wurde gelöscht'; +$this->phrasen['urlaubstool/xHatZeitausgleichGeloescht']='%s %s hat einen eingetragenen Zeitausgleich gelöscht'; $this->phrasen['urlaubstool/VorgesetzteInformiert']='Email wurde an %s versandt'; $this->phrasen['urlaubstool/konnteKeinInformationsemailVersendetWerden']='Es konnte kein Email versendet werden, da kein Vorgesetzter eingetragen ist!'; -$this->phrasen['urlaubstool/xHatUrlaubGeloescht']='%s %s hat bereits freigegebenen Urlaub gelöscht'; +$this->phrasen['urlaubstool/xHatUrlaubGeloescht']='%s %s hat Urlaub gelöscht'; $this->phrasen['urlaubstool/urlaubsfreigabe']='Freigabe Urlaub: '; $this->phrasen['urlaubstool/bestaetigungsmailWurdeVersandt']='Bestätigungsmail an %s versandt'; $this->phrasen['urlaubstool/urlaubVon']='Ihr angefragter Urlaub von'; diff --git a/locale/en-US/urlaubstool.php b/locale/en-US/urlaubstool.php index 697117c34..17a31c986 100644 --- a/locale/en-US/urlaubstool.php +++ b/locale/en-US/urlaubstool.php @@ -36,6 +36,13 @@ $this->phrasen['urlaubstool/meineZeitsperren']='My Planned Absences'; $this->phrasen['urlaubstool/sieKoennenDiesenUnterFolgenderAdresseFreigeben']='Sie können diesen unter folgender Adresse freigeben'; //Nur übersetzen, wenn die eMail in der eingestellten Sprache versandt werden soll $this->phrasen['urlaubstool/freigabeansuchenUrlaub']='Freigabeansuchen Urlaub'; //Nur übersetzen, wenn die eMail in der eingestellten Sprache versandt werden soll $this->phrasen['urlaubstool/freigabeFehlt']='Vacation has not been approved yet'; +$this->phrasen['urlaubstool/zeitausgleichNeu']='Compensatory time was entered'; +$this->phrasen['urlaubstool/zeitausgleichGeaendert']='Compensatory time was changed'; +$this->phrasen['urlaubstool/zeitausgleichGeloescht']='Compensatory time was deleted'; +$this->phrasen['urlaubstool/xHatZeitausgleichGeloescht']='Compensatory time was deleted by %s %s'; +$this->phrasen['urlaubstool/xHatUrlaubGeloescht']='Vacation was deleted by %s %s'; +$this->phrasen['urlaubstool/UrlaubGeloescht']='Urlaub wurde gelöscht'; +$this->phrasen['urlaubstool/freigegebenerUrlaubGeloescht']='Approved Vacation was deleted by %s %s'; $this->phrasen['urlaubstool/urlaubsfreigabe']='Vacation approval: '; $this->phrasen['urlaubstool/bestaetigungsmailWurdeVersandt']='Confirmation mail to %s sent'; $this->phrasen['urlaubstool/urlaubVon']='Ihr angefragter Urlaub von'; //Nur übersetzen, wenn die eMail in der eingestellten Sprache versandt werden soll From 797cabccb969843cc9afcbd998e4923a7ffda37b Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 29 Jun 2022 08:46:01 +0200 Subject: [PATCH 005/138] neue Mailvorlagen Sancho fuer Zeitausgleich und Urlaub --- cis/private/profile/zeitsperre_resturlaub.php | 169 ++++++------------ 1 file changed, 51 insertions(+), 118 deletions(-) diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index b5118dce4..12f9dfa97 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -108,7 +108,12 @@ $addon_obj->loadAddons(); foreach($addon_obj->result as $addon) { if(file_exists('../../../addons/'.$addon->kurzbz.'/cis/init.js.php')) + { echo ''; + $addoncasetime = true; + require_once('../../../addons/casetime/include/functions.inc.php'); + } + } // Wenn Seite fertig geladen ist Addons aufrufen @@ -162,62 +167,6 @@ $( document ).ready(function() return [true, ""]; } -function AddonCaseTimeLoadZeitsaldo(uid) -{ - $.ajax({ - type: "GET", - dataType: "json", - url: "'.APP_ROOT.'/addons/casetime/vilesci/zeitsaldo.php?uid="+uid, - success: function (result) - { - if (result===false) - { - $("#zeitsaldo").html("error"); - } - else - { - var DatumAktuell = new Date(); - //var DatumAktuell = new Date(2016,0,11); - var MonatAktuell = DatumAktuell.getMonth()+1; - var MonatLetztes = MonatAktuell - 1; - var JahrAktuell = DatumAktuell.getFullYear(); - var JahrLetztes = DatumAktuell.getFullYear(); - var VorJahr = JahrAktuell -1; - if (MonatLetztes == 0) - { - MonatLetztes = 12; - JahrLetztes = JahrAktuell - 1; - } - var MonatVorLetztes = MonatLetztes -1; - var JahrVorLetztes = JahrLetztes; - if (MonatVorLetztes == 0) - { - MonatVorLetztes = 12; - JahrVorLetztes = JahrLetztes -1; - } - - - var zahl = parseFloat(result); - if (zahl > 0) - var faktor = 1; - else - var faktor = -1; - zahl = zahl * faktor; - var std = Math.floor(zahl); - var min = (zahl-Math.floor(zahl))*60; - min = Math.round(min); - var std_anzeigealt = std+"h:"+min+"m"; - - $(\'input[name="zeitsaldo"]\').val("Aktueller Stundensaldo: "+result +" Stunden ("+std_anzeigealt+")"); - - } - }, - error: function(){ - alert("Error Casetime Load"); - } - }); -} - '; ?> @@ -399,16 +348,20 @@ function showHideStudeDropDown() load($uid); + $nameMitarbeiter = $benutzer->vorname. " ". $benutzer->nachname; + $beschreibung = (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung); + if($datum_obj->formatDatum($zeitsperre->vondatum, 'm')>=9) $jahr = $datum_obj->formatDatum($zeitsperre->vondatum, 'Y')+1; else $jahr = $datum_obj->formatDatum($zeitsperre->vondatum, 'Y'); + $von = $datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'); + $bis = $datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); + // Wenn ein neuer Urlaub eingetragen wurde, Freigabemail-Text if ($zeitsperre->zeitsperretyp_kurzbz=='Urlaub') { - if ($zeitsperre->new) - { - $mailSancho = " $benutzer->nachname $benutzer->vorname hat einen neuen Urlaub eingetragen:
"; - - $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). - " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). - " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'). - ".
Sie können diesen unter folgender Adresse freigeben:

". - " Link Urlaubstool "; + $zeitsaldo = " Link Urlaubstool "; $subject = "Freigabeansuchen"; - - $zeitsaldo = ''; - } - + $mailvorlage = 'Sancho_Mail_Urlaub_Neu'; } // Wenn ein Zeitausgleich eingetragen wurde... + //manu zeitsperre neu if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA') { // ...Mail-Text für neuen Zeitausgleich if ($zeitsperre->new) { - $mailSancho = " $benutzer->nachname $benutzer->vorname hat einen neuen Zeitausgleich eingetragen:
"; - - $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). - " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). - " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); - $subject = $p->t('urlaubstool/zeitausgleichNeu'); + $mailvorlage = 'Sancho_Content_Zeitausgleich'; } // ...Mail-Text für geaenderten Zeitausgleich else { - $mailSancho = " $benutzer->nachname $benutzer->vorname hat den Zeitausgleich wie folgt geändert:
" ; - - $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). - " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). - " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); - $subject = $subject = $p->t('urlaubstool/zeitausgleichGeaendert'); + $mailvorlage = 'Sancho_Content_ZA_Aendern'; } } @@ -659,11 +598,15 @@ if(isset($_GET['type']) && ($_GET['type']=='edit_sperre' || $_GET['type']=='new_ //Sanchomail mit Vorlage Sancho Mail Zeitausgleich $template_data = array( 'vorgesetzter' => $fullName, - 'textZeitausgleich' => $mailSancho, + 'nameMitarbeiter' => $nameMitarbeiter, + 'beschreibung' =>$beschreibung, + 'vonDatum' => $von, + 'bisDatum' => $bis, 'Saldo'=> $zeitsaldo ); - if (sendSanchoMail('Sancho_Content_Zeitausgleich', $template_data, $to, $subject)) + + if (sendSanchoMail($mailvorlage, $template_data, $to, $subject)) { if ($zeitsperre->zeitsperretyp_kurzbz=='Urlaub') { @@ -703,8 +646,11 @@ if((isset($_GET['type']) && $_GET['type']=='delete_sperre' && isset($_GET['infor $zeitsperre->loadZeitsperretyp($zeitsperre->zeitsperretyp_kurzbz); $zeitsperre->beschreibung = $zeitsperre->result[0]->beschreibung; - $vondatum = $zeitsperre->getVonDatum(); - $bisdatum = $zeitsperre->getBisDatum(); + $vonDatum = $zeitsperre->getVonDatum(); + $bisDatum = $zeitsperre->getBisDatum(); + + $vonDatum = $datum_obj->formatDatum($vonDatum ,'d.m.Y'); + $bisDatum = $datum_obj->formatDatum($bisDatum,'d.m.Y'); if(!$zeitsperre->delete($_GET['id'])) @@ -736,41 +682,30 @@ if((isset($_GET['type']) && $_GET['type']=='delete_sperre' && isset($_GET['infor $benutzer = new benutzer(); $benutzer->load($uid); + $nameMitarbeiter = $benutzer->vorname. " ". $benutzer->nachname; + $beschreibung = (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung); - if ($zeitsperre->zeitsperretyp_kurzbz == 'Urlaub') - { - $mailSancho = $p->t('urlaubstool/xHatUrlaubGeloescht', array($benutzer->nachname, $benutzer->vorname)).":
"; - - $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). - " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). - " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); - - // $subject = $p->t('urlaubstool/freigegebenerUrlaubGeloescht'); + if ($zeitsperre->zeitsperretyp_kurzbz == 'Urlaub') + { $subject = $p->t('urlaubstool/UrlaubGeloescht'); - - + $mailvorlage = 'Sancho_Mail_Urlaub_Loeschen'; } - if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA') - { - $mailSancho = $p->t('urlaubstool/xHatZeitausgleichGeloescht', array($benutzer->nachname, $benutzer->vorname)) . ":
"; - - $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). - " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). - " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); - - $subject = $p->t('urlaubstool/zeitausgleichGeloescht'); - - } + if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA') + { + $subject = $p->t('urlaubstool/zeitausgleichGeloescht'); + $mailvorlage = 'Sancho_Mail_ZA_loeschen'; + } $template_data = array( 'vorgesetzter' => $fullName, - 'textZeitausgleich' => $mailSancho, - 'Saldo' => '' + 'nameMitarbeiter' => $nameMitarbeiter, + 'beschreibung' =>$beschreibung, + 'vonDatum' => $vonDatum, + 'bisDatum' => $bisDatum ); - - if (sendSanchoMail('Sancho_Content_Zeitausgleich', $template_data, $to, $subject)) + if (sendSanchoMail($mailvorlage, $template_data, $to, $subject)) { echo "" . $p->t('global/erfolgreichgelöscht') . '
'; echo "
".$p->t('urlaubstool/VorgesetzteInformiert',array($fullName)).""; @@ -997,12 +932,10 @@ if($result = $db->db_query($qry)) } $content_form.= ''; -//visible field für Zeitsaldo in Mail ZA -$content_form.= ''; - //$content_form.= ''.$p->t('global/bezeichnung').' //'; + $content_form.= "".$p->t('urlaubstool/erreichbarkeit')."'; } else { - echo ''; } } diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index 12f9dfa97..f18a4b2cc 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -102,20 +102,20 @@ $num_rows_stunde=$db->db_num_rows($result_stunde); loadAddons(); foreach($addon_obj->result as $addon) { if(file_exists('../../../addons/'.$addon->kurzbz.'/cis/init.js.php')) - { echo ''; - $addoncasetime = true; - require_once('../../../addons/casetime/include/functions.inc.php'); - } - } +// Überprüfen, ob addon casetime aktiv ist +$addoncasetime = $addon_obj->checkActiveAddon("casetime"); +echo $addon_obj->checkActiveAddon("asterisk"); + // Wenn Seite fertig geladen ist Addons aufrufen echo ' '; - $addoncasetime = true; - require_once('../../addons/casetime/include/functions.inc.php'); - } + require_once('../../addons/casetime/include/functions.inc.php'); } + //Kopfzeile echo ' @@ -96,7 +91,7 @@ echo ' "); +if (!in_array($gebiet_id, $_SESSION['alleGebiete'])) + die($p->t('testtool/dasGebietIstNichtFuerSieBestimmt')); + $gebiet = new gebiet($gebiet_id); if($gebiet->level_start!='') diff --git a/cis/testtool/menu.php b/cis/testtool/menu.php index e4b0a82fe..1e39885d8 100644 --- a/cis/testtool/menu.php +++ b/cis/testtool/menu.php @@ -277,6 +277,7 @@ if (isset($_SESSION['pruefling_id'])) $anzahlGebiete = $db->db_num_rows($result); $lastsemester = ''; $quereinsteiger_stg = ''; + $_SESSION['alleGebiete']= []; while($row = $db->db_fetch_object($result)) { //Jedes Semester in einer eigenen Tabelle anzeigen @@ -385,6 +386,7 @@ if (isset($_SESSION['pruefling_id'])) '; + $_SESSION['alleGebiete'][] = $row->gebiet_id; } else { diff --git a/locale/de-AT/testtool.php b/locale/de-AT/testtool.php index dbafe21e9..81a2ca1ca 100644 --- a/locale/de-AT/testtool.php +++ b/locale/de-AT/testtool.php @@ -45,6 +45,7 @@ $this->phrasen['testtool/beiDiesemGebietMuessenSieJedeFrageBeantworten']='Bei di $this->phrasen['testtool/bearbeitungszeit']='Bearbeitungszeit'; $this->phrasen['testtool/dieZeitIstAbgelaufen']='Die Zeit ist abgelaufen!
Bitte aktivieren Sie Javascript in Ihrem Browser!'; $this->phrasen['testtool/dieseFrageIstNichtFuerSieBestimmt']='Diese Frage ist nicht für Sie bestimmt'; +$this->phrasen['testtool/dasGebietIstNichtFuerSieBestimmt']='Das Gebiet ist nicht für Sie bestimmt'; $this->phrasen['testtool/fehlerBeimSpeichernDerErstansicht']='Fehler beim Speichern der Erstansicht'; $this->phrasen['testtool/startDrueckenUmZuBeginnen']='Um dieses Teilgebiet zu starten, drücken Sie bitte links oben auf Gebiet starten.'; $this->phrasen['testtool/keinPrueflingseintragVorhanden']='Kein Prüflingseintrag vorhanden'; diff --git a/locale/en-US/testtool.php b/locale/en-US/testtool.php index 473ac1e0d..87b818062 100644 --- a/locale/en-US/testtool.php +++ b/locale/en-US/testtool.php @@ -45,6 +45,7 @@ $this->phrasen['testtool/beiDiesemGebietMuessenSieJedeFrageBeantworten']='In thi $this->phrasen['testtool/bearbeitungszeit']='Time'; $this->phrasen['testtool/dieZeitIstAbgelaufen']='The time has run out!
Please enable JavaScript in your browser!'; $this->phrasen['testtool/dieseFrageIstNichtFuerSieBestimmt']='This question is not intended for you'; +$this->phrasen['testtool/dasGebietIstNichtFuerSieBestimmt']='This section is not intended for you'; $this->phrasen['testtool/fehlerBeimSpeichernDerErstansicht']='Error in saving the initial view'; $this->phrasen['testtool/startDrueckenUmZuBeginnen']='To start this section, please click on Start section in the top left corner.'; $this->phrasen['testtool/keinPrueflingseintragVorhanden']='No candidate entry available.'; diff --git a/locale/it-IT/testtool.php b/locale/it-IT/testtool.php index 0f64986a9..9a3553efe 100644 --- a/locale/it-IT/testtool.php +++ b/locale/it-IT/testtool.php @@ -7,6 +7,7 @@ $this->phrasen['testtool/bitteZuerstAnmelden']=''; $this->phrasen['testtool/blaettern']=''; $this->phrasen['testtool/demo']=''; $this->phrasen['testtool/dieseFrageIstNichtFuerSieBestimmt']=''; +$this->phrasen['testtool/dasGebietIstNichtFuerSieBestimmt']=''; $this->phrasen['testtool/dieZeitIstAbgelaufen']=''; $this->phrasen['testtool/einleitung']=''; $this->phrasen['testtool/esWurdeKeineFrageGefunden']=''; From 8670ab18f80586454dc1eff6748500f8cfce5904 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 5 Sep 2022 11:27:33 +0200 Subject: [PATCH 015/138] =?UTF-8?q?Zeitaufzeichnung:=20Ber=C3=BCcksichtigu?= =?UTF-8?q?ng=20von=20Attribut=20Zeitaufzeichnung=20bei=20Projekt=20und=20?= =?UTF-8?q?Projektphase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/tools/zeitaufzeichnung.php | 29 ++++++++++++++-- .../tools/zeitaufzeichnung_projektphasen.php | 1 + include/projektphase.class.php | 34 +++++++++++++++++++ 3 files changed, 62 insertions(+), 2 deletions(-) diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index ba57b442f..003eea434 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -605,9 +605,14 @@ echo ' { projphasenhtml += "'; + echo ''; } echo ''; } diff --git a/cis/private/tools/zeitaufzeichnung_projektphasen.php b/cis/private/tools/zeitaufzeichnung_projektphasen.php index 053f38b91..05df74443 100644 --- a/cis/private/tools/zeitaufzeichnung_projektphasen.php +++ b/cis/private/tools/zeitaufzeichnung_projektphasen.php @@ -86,6 +86,7 @@ if (isset($_GET['projekt_kurzbz'])) $item['bezeichnung'] = $row->bezeichnung; $item['start'] = $datum_obj->formatDatum($row->start, 'd.m.Y'); $item['ende'] = $datum_obj->formatDatum($row->ende, 'd.m.Y'); + $item['zeitaufzeichnung_erlaubt'] = $row->zeitaufzeichnung; $result_obj[] = $item; } } diff --git a/include/projektphase.class.php b/include/projektphase.class.php index 19bd85d6d..4e3c38b7c 100644 --- a/include/projektphase.class.php +++ b/include/projektphase.class.php @@ -829,5 +829,39 @@ class projektphase extends basis_db return false; } } + + /** + * Gibt zurück, ob für eine Projektphase Zeitaufzeichnungsbuchung erlaubt ist + * @param $projektphase_id die zu überprüfende Projektphase + * @return boolean true, wenn Buchung erlaubt + */ + public function getPhasenZA($projektphase_id) + { + $qry = " + SELECT + fue.tbl_projektphase.zeitaufzeichnung + FROM + fue.tbl_projektphase + WHERE + tbl_projektphase.projektphase_id = ".$this->db_add_param($projektphase_id); + + if ($this->db_query($qry)) + { + if ($row = $this->db_fetch_object()) + { + return $row->zeitaufzeichnung; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } } ?> From 625b3c74c42a6a2299156abeae0a13f52e4d3265 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 7 Sep 2022 09:22:06 +0200 Subject: [PATCH 016/138] =?UTF-8?q?Bewerbungstool:=20keine=20ZGV=20bei=20A?= =?UTF-8?q?bbrechern,=20Ber=C3=BCcksichtigung=20studentstatus=20f=C3=BCr?= =?UTF-8?q?=20Dokumenthandling?= 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 017/138] 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 7252bc1e6f07e053bae5a4afc860cd757985e75a Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 9 Sep 2022 13:20:50 +0200 Subject: [PATCH 018/138] add config.file --- cis/private/profile/zeitsperre_resturlaub.php | 1 + 1 file changed, 1 insertion(+) diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index 04615ab66..351ebc29d 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -350,6 +350,7 @@ function showHideStudeDropDown() $zeitsaldo = ""; if($addoncasetime) { + require_once('../../../addons/casetime/config.inc.php'); require_once('../../../addons/casetime/include/functions.inc.php'); $zeitsaldo = getCaseTimeZeitsaldo($uid); $zeitsaldo = "Aktueller Zeitsaldo: ". $zeitsaldo . " (".formatZeitsaldo($zeitsaldo).")"; From 0d03689f570604b995ce0e147c2101141f6796da Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 14 Sep 2022 02:48:43 +0200 Subject: [PATCH 019/138] added IIssueExistsChecker and Issueload->model('system/Issue_model', 'IssueModel'); + + $this->load->library('IssuesLib'); + } + + /** + * Initializes issue resolution. + */ + public function run() + { + $this->logInfo("Issue producer job started"); + + foreach ($this->_codeLibMappings as $fehlercode => $library) + { + // add person id and oe kurzbz automatically as params, merge it with additional params + // decode bewerbung_parameter into assoc array + $params = array_merge( + array('issue_id' => $issue->issue_id, 'issue_person_id' => $issue->person_id, 'issue_oe_kurzbz' => $issue->oe_kurzbz), + isset($issue->behebung_parameter) ? json_decode($issue->behebung_parameter, true) : array() + ); + + // if called from extension (extension name set), path includes extension names, otherwise it is the core library folder + $libRootPath = isset($this->_extensionName) ? 'extensions/' . $this->_extensionName . '/' : ''; + $issuesLibPath = $libRootPath . self::ISSUES_FOLDER . '/'; + $issuesLibFilePath = DOC_ROOT . 'application/' . $libRootPath . 'libraries/' . self::ISSUES_FOLDER . '/' . $libName . '.php'; + + // check if library file exists + if (!file_exists($issuesLibFilePath)) + { + // log error and continue with next issue if not + $this->logError("Issue library file " . $issuesLibFilePath . " does not exist"); + continue; + } + + // load library connected to fehlercode + $this->load->library( + $issuesLibPath . $libName + ); + + $lowercaseLibName = mb_strtolower($libName); + + // check if method is defined in libary class + if (!is_callable(array($this->{$lowercaseLibName}, self::CHECK_ISSUE_EXISTS_METHOD_NAME))) + { + // log error and continue with next issue if not + $this->logError("Method " . self::CHECK_ISSUE_EXISTS_METHOD_NAME . " is not defined in library $lowercaseLibName"); + continue; + } + + // call the function for checking for issue resolution + $issueResolvedRes = $this->{$lowercaseLibName}->{self::CHECK_ISSUE_EXISTS_METHOD_NAME}($params); + + if (isError($issueResolvedRes)) + { + $this->logError(getError($issueResolvedRes)); + } + else + { + $issueResolvedData = getData($issueResolvedRes); + + if ($issueResolvedData === true) + { + // set issue to resolved if needed + $behobenRes = $this->issueslib->setBehoben($issue->issue_id, null); + + if (isError($behobenRes)) + $this->logError(getError($behobenRes)); + else + $this->logInfo("Issue " . $issue->issue_id . " successfully resolved"); + } + } + } + + $this->logInfo("Issue resolve job ended"); + } +} From d5eff7d6154e94e42a00b8164553c337fb6f7a49 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Thu, 15 Sep 2022 18:56:18 +0200 Subject: [PATCH 020/138] issue plausichecks: added issue producer files, code formatting --- .../controllers/jobs/PlausiIssueProducer.php | 40 +++++++ application/core/IIssueExistsChecker.php | 10 +- application/core/IssueProducer_Controller.php | 101 +++++++----------- application/core/IssueResolver_Controller.php | 6 +- application/libraries/IssuesLib.php | 14 ++- .../libraries/issues/PlausicheckLib.php | 25 +++++ 6 files changed, 127 insertions(+), 69 deletions(-) create mode 100644 application/controllers/jobs/PlausiIssueProducer.php create mode 100644 application/libraries/issues/PlausicheckLib.php diff --git a/application/controllers/jobs/PlausiIssueProducer.php b/application/controllers/jobs/PlausiIssueProducer.php new file mode 100644 index 000000000..03fa6866f --- /dev/null +++ b/application/controllers/jobs/PlausiIssueProducer.php @@ -0,0 +1,40 @@ + class (library) name for resolving + $this->_fehlerLibMappings = array( + 'zgvDatumInZukunft' => 'ZgvDatumInZukunft', + 'zgvDatumVorGeburtsdatum' => 'ZgvDatumVorGeburtsdatum', + 'zgvMasterDatumInZukunft' => 'ZgvMasterDatumInZukunft', + 'zgvMasterDatumVorZgvdatum' => 'ZgvMasterDatumVorZgvdatum', + 'zgvMasterDatumVorGeburtsdatum' => 'ZgvMasterDatumVorGeburtsdatum', + 'keinAufenthaltszweckPlausi' => 'KeinAufenthaltszweckPlausi', + 'zuVieleZweckeIncomingPlausi' => 'ZuVieleZweckeIncomingPlausi', + 'falscherIncomingZweckPlausi' => 'FalscherIncomingZweckPlausi', + 'outgoingAufenthaltfoerderungfehltPlausi' => 'OutgoingAufenthaltfoerderungfehltPlausi', + 'outgoingAngerechneteEctsFehlenPlausi' => 'OutgoingAngerechneteEctsFehlenPlausi', + 'outgoingErworbeneEctsFehlenPlausi' => 'OutgoingErworbeneEctsFehlenPlausi' + ); + + $this->load->model('studiensemester_model', 'StudiensemesterModel'); + } + + public function run() + { + $semRes = $this->StudiensemesterModel->getAkt(); + + if (hasData($semRes)) + { + $studiensemester_kurzbz = getData($semRes)[0]->studiensemester_kurzbz; + } + } +} diff --git a/application/core/IIssueExistsChecker.php b/application/core/IIssueExistsChecker.php index 7a79b26ae..0aecaa796 100644 --- a/application/core/IIssueExistsChecker.php +++ b/application/core/IIssueExistsChecker.php @@ -7,9 +7,15 @@ interface IIssueExistsChecker { /** * Checks if an issue exists. - * Classes for checking if a certain issue exists implement this method. * @param array $params parameters needed for issue detection * @return object with success(true) if issue exists, success(false) otherwise */ - public function checkIfIssueExists($params); + public function checkIfIssueExists($paramsForChecking); + + /** + * Produces an issue. + * @param array $params parameters needed for issue detection + * @return object with success(true) if issue exists, success(false) otherwise + */ + public function produceIssue($person_id, $oe_kurzbz, $paramsForProducing); } diff --git a/application/core/IssueProducer_Controller.php b/application/core/IssueProducer_Controller.php index 625702a07..e0de28d88 100644 --- a/application/core/IssueProducer_Controller.php +++ b/application/core/IssueProducer_Controller.php @@ -7,8 +7,9 @@ abstract class IssueProducer_Controller extends JOB_Controller { const ISSUES_FOLDER = 'issues'; const CHECK_ISSUE_EXISTS_METHOD_NAME = 'checkIfIssueExists'; + const PRODUCE_ISSUE_METHOD_NAME = 'produceIssue'; - protected $_codeLibMappings; + protected $_fehlerLibMappings; public function __construct() { @@ -20,73 +21,51 @@ abstract class IssueProducer_Controller extends JOB_Controller } /** - * Initializes issue resolution. + * Initializes issue production. */ - public function run() + public function produceIssue($fehler_kurzbz, $person_id, $oe_kurzbz, $paramsForChecking, $paramsForProduction) { - $this->logInfo("Issue producer job started"); + // get libname from fehler_kurzbz + $libName = $this->_fehlerLibMappings[$fehler_kurzbz]; + + // if called from extension (extension name set), path includes extension names, otherwise it is the core library folder + $libRootPath = isset($this->_extensionName) ? 'extensions/' . $this->_extensionName . '/' : ''; + $issuesLibPath = $libRootPath . self::ISSUES_FOLDER . '/'; + $issuesLibFilePath = DOC_ROOT . 'application/' . $libRootPath . 'libraries/' . self::ISSUES_FOLDER . '/' . $libName . '.php'; - foreach ($this->_codeLibMappings as $fehlercode => $library) + // check if library file exists + if (!file_exists($issuesLibFilePath)) return error("Issue library file " . $issuesLibFilePath . " does not exist"); + + // load library connected to fehler_kurzbz + $this->load->library($issuesLibPath . $libName); + + $lowercaseLibName = mb_strtolower($libName); + + // check if method is defined in library class + if (!is_callable(array($this->{$lowercaseLibName}, self::CHECK_ISSUE_EXISTS_METHOD_NAME))) + return error("Method " . self::CHECK_ISSUE_EXISTS_METHOD_NAME . " is not defined in library $lowercaseLibName"); + + // call the function for checking for issue resolution + $issueExistsRes = $this->{$lowercaseLibName}->{self::CHECK_ISSUE_EXISTS_METHOD_NAME}($paramsForChecking); + + if (isError($issueExistsRes)) return $issueExistsRes; + + $issueExistsData = getData($issueExistsRes); + + if ($issueExistsData === true) { - // add person id and oe kurzbz automatically as params, merge it with additional params - // decode bewerbung_parameter into assoc array - $params = array_merge( - array('issue_id' => $issue->issue_id, 'issue_person_id' => $issue->person_id, 'issue_oe_kurzbz' => $issue->oe_kurzbz), - isset($issue->behebung_parameter) ? json_decode($issue->behebung_parameter, true) : array() + // write issue if it was detected + $produceRes = $this->{$lowercaseLibName}->{self::PRODUCE_ISSUE_METHOD_NAME}( + $fehler_kurzbz, + isset($params['person_id']) ? $params['person_id'] : null, + isset($params['oe_kurzbz']) ? $params['oe_kurzbz'] : null, + $paramsForProduction ); - // if called from extension (extension name set), path includes extension names, otherwise it is the core library folder - $libRootPath = isset($this->_extensionName) ? 'extensions/' . $this->_extensionName . '/' : ''; - $issuesLibPath = $libRootPath . self::ISSUES_FOLDER . '/'; - $issuesLibFilePath = DOC_ROOT . 'application/' . $libRootPath . 'libraries/' . self::ISSUES_FOLDER . '/' . $libName . '.php'; + if (isError($produceRes)) + return $produceRes; - // check if library file exists - if (!file_exists($issuesLibFilePath)) - { - // log error and continue with next issue if not - $this->logError("Issue library file " . $issuesLibFilePath . " does not exist"); - continue; - } - - // load library connected to fehlercode - $this->load->library( - $issuesLibPath . $libName - ); - - $lowercaseLibName = mb_strtolower($libName); - - // check if method is defined in libary class - if (!is_callable(array($this->{$lowercaseLibName}, self::CHECK_ISSUE_EXISTS_METHOD_NAME))) - { - // log error and continue with next issue if not - $this->logError("Method " . self::CHECK_ISSUE_EXISTS_METHOD_NAME . " is not defined in library $lowercaseLibName"); - continue; - } - - // call the function for checking for issue resolution - $issueResolvedRes = $this->{$lowercaseLibName}->{self::CHECK_ISSUE_EXISTS_METHOD_NAME}($params); - - if (isError($issueResolvedRes)) - { - $this->logError(getError($issueResolvedRes)); - } - else - { - $issueResolvedData = getData($issueResolvedRes); - - if ($issueResolvedData === true) - { - // set issue to resolved if needed - $behobenRes = $this->issueslib->setBehoben($issue->issue_id, null); - - if (isError($behobenRes)) - $this->logError(getError($behobenRes)); - else - $this->logInfo("Issue " . $issue->issue_id . " successfully resolved"); - } - } + return success("Issue " . $issue->issue_id . " successfully written"); } - - $this->logInfo("Issue resolve job ended"); } } diff --git a/application/core/IssueResolver_Controller.php b/application/core/IssueResolver_Controller.php index 77d14f408..ec47a060c 100755 --- a/application/core/IssueResolver_Controller.php +++ b/application/core/IssueResolver_Controller.php @@ -73,13 +73,11 @@ abstract class IssueResolver_Controller extends JOB_Controller } // load library connected to fehlercode - $this->load->library( - $issuesLibPath . $libName - ); + $this->load->library($issuesLibPath . $libName); $lowercaseLibName = mb_strtolower($libName); - // check if method is defined in libary class + // check if method is defined in library class if (!is_callable(array($this->{$lowercaseLibName}, self::CHECK_ISSUE_RESOLVED_METHOD_NAME))) { // log error and continue with next issue if not diff --git a/application/libraries/IssuesLib.php b/application/libraries/IssuesLib.php index d6488bc36..e31cb88c6 100644 --- a/application/libraries/IssuesLib.php +++ b/application/libraries/IssuesLib.php @@ -169,6 +169,9 @@ class IssuesLib return $this->_changeIssueStatus($issue_id, $data, $user); } + // -------------------------------------------------------------------------------------------------------------- + // Private methods + /** * Changes status of an issue. * @param int $issue_id @@ -215,8 +218,15 @@ class IssuesLib * @param string $inhalt_extern * @return object success or error */ - private function _addIssue($fehlercode, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null, $resolution_params = null, $fehlercode_extern = null, $inhalt_extern = null) - { + private function _addIssue( + $fehlercode, + $person_id = null, + $oe_kurzbz = null, + $fehlertext_params = null, + $resolution_params = null, + $fehlercode_extern = null, + $inhalt_extern = null + ) { if (isEmptyString($person_id) && isEmptyString($oe_kurzbz)) return error("Person_id or oe_kurzbz must be set."); diff --git a/application/libraries/issues/PlausicheckLib.php b/application/libraries/issues/PlausicheckLib.php new file mode 100644 index 000000000..26b079c21 --- /dev/null +++ b/application/libraries/issues/PlausicheckLib.php @@ -0,0 +1,25 @@ +_ci =& get_instance(); + + $this->_ci->load->model('', ''); + } + + public function getStudents() + { + $qry = ' + + '; + } +} From 40d8edebef8e3299e22fe43e9a3f3abc30d79116 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Sun, 18 Sep 2022 23:02:55 +0200 Subject: [PATCH 021/138] Plausichecks: added run method to IssueProducer_Controller for producing plausicheck issues --- .../controllers/jobs/PlausiIssueProducer.php | 122 +++++++++++++++--- application/core/IIssueExistsChecker.php | 2 +- application/core/IssueProducer_Controller.php | 72 ++++++----- application/core/IssueResolver_Controller.php | 1 - .../libraries/issues/PlausicheckLib.php | 9 +- .../issues/plausichecks/IPlausiChecker.php | 14 ++ .../StgPrestudentUngleichStgStudent.php | 0 7 files changed, 156 insertions(+), 64 deletions(-) create mode 100644 application/libraries/issues/plausichecks/IPlausiChecker.php create mode 100644 application/libraries/issues/plausichecks/StgPrestudentUngleichStgStudent.php diff --git a/application/controllers/jobs/PlausiIssueProducer.php b/application/controllers/jobs/PlausiIssueProducer.php index 03fa6866f..d67c8693b 100644 --- a/application/controllers/jobs/PlausiIssueProducer.php +++ b/application/controllers/jobs/PlausiIssueProducer.php @@ -3,38 +3,120 @@ /** * Job for producing Plausicheck issues */ -class PlausiIssueProducer extends IssueProducer_Controller +class PlausiIssueProducer extends JOB_Controller { + const PLAUSI_ISSUES_FOLDER = 'issues/plausichecks'; + const EXECUTE_PLAUSI_CHECK_METHOD_NAME = 'executePlausiCheck' + + private _fehlerLibMappings; + public function __construct() { parent::__construct(); - // set fehler codes which can be produced by the job - // structure: fehlercode => class (library) name for resolving + // set fehler which can be produced by the job + // structure: fehler_kurzbz => class (library) name for resolving $this->_fehlerLibMappings = array( - 'zgvDatumInZukunft' => 'ZgvDatumInZukunft', - 'zgvDatumVorGeburtsdatum' => 'ZgvDatumVorGeburtsdatum', - 'zgvMasterDatumInZukunft' => 'ZgvMasterDatumInZukunft', - 'zgvMasterDatumVorZgvdatum' => 'ZgvMasterDatumVorZgvdatum', - 'zgvMasterDatumVorGeburtsdatum' => 'ZgvMasterDatumVorGeburtsdatum', - 'keinAufenthaltszweckPlausi' => 'KeinAufenthaltszweckPlausi', - 'zuVieleZweckeIncomingPlausi' => 'ZuVieleZweckeIncomingPlausi', - 'falscherIncomingZweckPlausi' => 'FalscherIncomingZweckPlausi', - 'outgoingAufenthaltfoerderungfehltPlausi' => 'OutgoingAufenthaltfoerderungfehltPlausi', - 'outgoingAngerechneteEctsFehlenPlausi' => 'OutgoingAngerechneteEctsFehlenPlausi', - 'outgoingErworbeneEctsFehlenPlausi' => 'OutgoingErworbeneEctsFehlenPlausi' + '' => '' + //'zgvDatumInZukunft' => 'ZgvDatumInZukunft', + //'zgvDatumVorGeburtsdatum' => 'ZgvDatumVorGeburtsdatum', + //'zgvMasterDatumInZukunft' => 'ZgvMasterDatumInZukunft', + //'zgvMasterDatumVorZgvdatum' => 'ZgvMasterDatumVorZgvdatum', + //'zgvMasterDatumVorGeburtsdatum' => 'ZgvMasterDatumVorGeburtsdatum', + //'keinAufenthaltszweckPlausi' => 'KeinAufenthaltszweckPlausi', + //'zuVieleZweckeIncomingPlausi' => 'ZuVieleZweckeIncomingPlausi', + //'falscherIncomingZweckPlausi' => 'FalscherIncomingZweckPlausi', + //'outgoingAufenthaltfoerderungfehltPlausi' => 'OutgoingAufenthaltfoerderungfehltPlausi', + //'outgoingAngerechneteEctsFehlenPlausi' => 'OutgoingAngerechneteEctsFehlenPlausi', + //'outgoingErworbeneEctsFehlenPlausi' => 'OutgoingErworbeneEctsFehlenPlausi' ); + + $this->load->model('organisation/studiensemester_model', 'StudiensemesterModel'); - $this->load->model('studiensemester_model', 'StudiensemesterModel'); + $this->load->library('IssuesLib'); } - public function run() + /** + * Initializes issue production. + */ + public function run($studiensemester_kurzbz = null) { - $semRes = $this->StudiensemesterModel->getAkt(); - - if (hasData($semRes)) + if (isEmptyString($studiensemester_kurzbz)) { - $studiensemester_kurzbz = getData($semRes)[0]->studiensemester_kurzbz; + $studiensemesterRes = $this->StudiensemesterModel->getAkt(); + + if (isError($studiensemesterRes)) $this->logError(getError($studiensemesterRes)); + + if (hasData($studiensemesterRes)) + { + $studiensemester_kurzbz = getData($studiensemesterRes); + } } + + + $this->logInfo("Plausicheck issue producer job started"); + + foreach ($this->_fehlerLibMappings as $fehler_kurzbz => $libName) + { + // get path of library for issue to be produced + $issuesLibPath = DOC_ROOT . 'application/libraries' . self::PLAUSI_ISSUES_FOLDER; + $issuesLibFilePath = $issuesLibPath . '/' . $libName . '.php'; + + // check if library file exists + if (!file_exists($issuesLibFilePath)) + { + // log error and continue with next issue if not + $this->logError("Issue library file " . $issuesLibFilePath . " does not exist"); + continue; + } + + // load library connected to fehlercode + $this->load->library($issuesLibPath . $libName); + + $lowercaseLibName = mb_strtolower($libName); + + // check if method is defined in library class + if (!is_callable(array($this->{$lowercaseLibName}, self::EXECUTE_PLAUSI_CHECK_METHOD_NAME))) + { + // log error and continue with next issue if not + $this->logError("Method " . self::EXECUTE_PLAUSI_CHECK_METHOD_NAME . " is not defined in library $lowercaseLibName"); + continue; + } + + // call the function for checking for issue production + $executePlausiRes = $this->{$lowercaseLibName}->{self::EXECUTE_PLAUSI_CHECK_METHOD_NAME}(); + + if (isError($executePlausiRes)) + { + $this->logError(getError($executePlausiRes)); + } + else + { + // get the data returned by Plausicheck + $executePlausiData = getData($executePlausiRes); + + if (is_array($executePlausiData)) + { + foreach ($executePlausiData as $plausiData) + { + // get the data needed for issue production + $person_id = isset($plausiData['person_id']) ? $plausiData['person_id'] : null; + $oe_kurzbz = isset($plausiData['oe_kurzbz']) ? $plausiData['oe_kurzbz'] : null; + $fehlertext_params = isset($plausiData['fehlertext_params']) ? $plausiData['fehlertext_params'] : null; + $resolution_params = isset($plausiData['resolution_params']) ? $plausiData['resolution_params'] : null; + + // write the issue + $addIssueRes = $this->IssuesLib->addFhcIssue($fehler_kurzbz, $person_id, $oe_kurzbz, $fehlertext_params, $resolution_params); + + if (isError($addIssueRes)) + $this->logError(getError($behobenRes)); + else + $this->logInfo("Plausicheck issue " . $fehler_kurzbz . " successfully produced"); + } + } + } + } + + $this->logInfo("Plausicheck issue producer job stopped"); } } diff --git a/application/core/IIssueExistsChecker.php b/application/core/IIssueExistsChecker.php index 0aecaa796..7f5a6b6e5 100644 --- a/application/core/IIssueExistsChecker.php +++ b/application/core/IIssueExistsChecker.php @@ -17,5 +17,5 @@ interface IIssueExistsChecker * @param array $params parameters needed for issue detection * @return object with success(true) if issue exists, success(false) otherwise */ - public function produceIssue($person_id, $oe_kurzbz, $paramsForProducing); + //public function produceIssue($person_id, $oe_kurzbz, $paramsForProducing); } diff --git a/application/core/IssueProducer_Controller.php b/application/core/IssueProducer_Controller.php index e0de28d88..6879bc7dd 100644 --- a/application/core/IssueProducer_Controller.php +++ b/application/core/IssueProducer_Controller.php @@ -23,49 +23,53 @@ abstract class IssueProducer_Controller extends JOB_Controller /** * Initializes issue production. */ - public function produceIssue($fehler_kurzbz, $person_id, $oe_kurzbz, $paramsForChecking, $paramsForProduction) - { - // get libname from fehler_kurzbz - $libName = $this->_fehlerLibMappings[$fehler_kurzbz]; + //public function produceIssue($fehler_kurzbz, $person_id, $oe_kurzbz, $paramsForChecking, $paramsForProduction) + //{ + //// get libname from fehler_kurzbz + //$libName = $this->_fehlerLibMappings[$fehler_kurzbz]; - // if called from extension (extension name set), path includes extension names, otherwise it is the core library folder - $libRootPath = isset($this->_extensionName) ? 'extensions/' . $this->_extensionName . '/' : ''; - $issuesLibPath = $libRootPath . self::ISSUES_FOLDER . '/'; - $issuesLibFilePath = DOC_ROOT . 'application/' . $libRootPath . 'libraries/' . self::ISSUES_FOLDER . '/' . $libName . '.php'; + //// if called from extension (extension name set), path includes extension names, otherwise it is the core library folder + //$libRootPath = isset($this->_extensionName) ? 'extensions/' . $this->_extensionName . '/' : ''; + //$issuesLibPath = $libRootPath . self::ISSUES_FOLDER . '/'; + //$issuesLibFilePath = DOC_ROOT . 'application/' . $libRootPath . 'libraries/' . self::ISSUES_FOLDER . '/' . $libName . '.php'; - // check if library file exists - if (!file_exists($issuesLibFilePath)) return error("Issue library file " . $issuesLibFilePath . " does not exist"); + //// check if library file exists + //if (!file_exists($issuesLibFilePath)) return error("Issue library file " . $issuesLibFilePath . " does not exist"); - // load library connected to fehler_kurzbz - $this->load->library($issuesLibPath . $libName); + //// load library connected to fehler_kurzbz + //$this->load->library($issuesLibPath . $libName); - $lowercaseLibName = mb_strtolower($libName); + //$lowercaseLibName = mb_strtolower($libName); - // check if method is defined in library class - if (!is_callable(array($this->{$lowercaseLibName}, self::CHECK_ISSUE_EXISTS_METHOD_NAME))) - return error("Method " . self::CHECK_ISSUE_EXISTS_METHOD_NAME . " is not defined in library $lowercaseLibName"); + //// check if method is defined in library class + //if (!is_callable(array($this->{$lowercaseLibName}, self::CHECK_ISSUE_EXISTS_METHOD_NAME))) + //return error("Method " . self::CHECK_ISSUE_EXISTS_METHOD_NAME . " is not defined in library $lowercaseLibName"); - // call the function for checking for issue resolution - $issueExistsRes = $this->{$lowercaseLibName}->{self::CHECK_ISSUE_EXISTS_METHOD_NAME}($paramsForChecking); + //// call the function for checking for issue resolution + //$issueExistsRes = $this->{$lowercaseLibName}->{self::CHECK_ISSUE_EXISTS_METHOD_NAME}($paramsForChecking); - if (isError($issueExistsRes)) return $issueExistsRes; + //if (isError($issueExistsRes)) return $issueExistsRes; - $issueExistsData = getData($issueExistsRes); + //$issueExistsData = getData($issueExistsRes); - if ($issueExistsData === true) - { - // write issue if it was detected - $produceRes = $this->{$lowercaseLibName}->{self::PRODUCE_ISSUE_METHOD_NAME}( - $fehler_kurzbz, - isset($params['person_id']) ? $params['person_id'] : null, - isset($params['oe_kurzbz']) ? $params['oe_kurzbz'] : null, - $paramsForProduction - ); + //if ($issueExistsData === true) + //{ + //// write issue if it was detected + ////$produceRes = $this->{$lowercaseLibName}->{self::PRODUCE_ISSUE_METHOD_NAME}( + ////$fehler_kurzbz, + ////isset($params['person_id']) ? $params['person_id'] : null, + ////isset($params['oe_kurzbz']) ? $params['oe_kurzbz'] : null, + ////$paramsForProduction + ////); - if (isError($produceRes)) - return $produceRes; + ////if (isError($produceRes)) + ////return $produceRes; - return success("Issue " . $issue->issue_id . " successfully written"); - } - } + //$addIssueres = $this->IssuesLib->addFhcIssue($fehler_kurzbz, $person_id, $oe_kurzbz, $fehlertext_params, $resolution_params); + + //if (isError()) + + //return success("Issue " . $issue->issue_id . " successfully written"); + //} + //} } diff --git a/application/core/IssueResolver_Controller.php b/application/core/IssueResolver_Controller.php index ec47a060c..d6eda8afb 100755 --- a/application/core/IssueResolver_Controller.php +++ b/application/core/IssueResolver_Controller.php @@ -43,7 +43,6 @@ abstract class IssueResolver_Controller extends JOB_Controller } else { - $openIssues = getData($openIssuesRes); foreach ($openIssues as $issue) diff --git a/application/libraries/issues/PlausicheckLib.php b/application/libraries/issues/PlausicheckLib.php index 26b079c21..16c423aa3 100644 --- a/application/libraries/issues/PlausicheckLib.php +++ b/application/libraries/issues/PlausicheckLib.php @@ -2,7 +2,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); -class Lib +class PlausicheckLib { private $_ci; // Code igniter instance @@ -15,11 +15,4 @@ class Lib $this->_ci->load->model('', ''); } - - public function getStudents() - { - $qry = ' - - '; - } } diff --git a/application/libraries/issues/plausichecks/IPlausiChecker.php b/application/libraries/issues/plausichecks/IPlausiChecker.php new file mode 100644 index 000000000..415bc4735 --- /dev/null +++ b/application/libraries/issues/plausichecks/IPlausiChecker.php @@ -0,0 +1,14 @@ + Date: Sun, 18 Sep 2022 23:11:43 +0200 Subject: [PATCH 022/138] system/checkStudenten: corrected typo in Studierenden Orgform Plausicheck text output --- system/checkStudenten.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/checkStudenten.php b/system/checkStudenten.php index 2590574db..14c4f2239 100644 --- a/system/checkStudenten.php +++ b/system/checkStudenten.php @@ -492,7 +492,7 @@ if ($result = $db->db_query($qry)) /* * Studierende im aktuellen StSem die in Mischformstudiengängen keine Orgform eingetragen haben */ -$text .= "

Suche alle Bewerber die keine Orgform eingetragen haben.

"; +$text .= "

Suche alle Studierenden die keine Orgform eingetragen haben.

"; $qry = " SELECT From 4d44bbb79c5dbc6543a442b1be45f92fc1dcd64d Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 20 Sep 2022 12:39:20 +0200 Subject: [PATCH 023/138] Anzeige Aktueller Urlaubssaldo in Sanchomail --- cis/private/profile/urlaubstool.php | 20 ++++++++++++++++--- cis/private/profile/zeitsperre_resturlaub.php | 6 +++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/cis/private/profile/urlaubstool.php b/cis/private/profile/urlaubstool.php index 9f9e90646..c6d3452ab 100644 --- a/cis/private/profile/urlaubstool.php +++ b/cis/private/profile/urlaubstool.php @@ -218,7 +218,7 @@ if((isset($_GET['delete']) && isset($_GET['informSupervisor'])) || (isset($_POS $from='vilesci@'.DOMAIN; - //Sanchomail mit Vorlage Sancho Mail Zeitausgleich + //Sanchomail mit Vorlage Sancho Mail Urlaub $template_data = array( 'vorgesetzter' => $fullName, 'nameMitarbeiter' => $nameMitarbeiter, @@ -428,14 +428,27 @@ if(isset($_GET['speichern']) && isset($_GET['wtag'])) $from='vilesci@'.DOMAIN; - //Sanchomail mit Vorlage Sancho Mail Zeitausgleich + // Überprüfen, ob addon casetime aktiv ist + $addon_obj = new addon(); + $addoncasetime = $addon_obj->checkActiveAddon("casetime"); + $urlaubssaldo = ""; + if($addoncasetime) + { + require_once('../../../addons/casetime/config.inc.php'); + require_once('../../../addons/casetime/include/functions.inc.php'); + $urlaubssaldo = getCastTimeUrlaubssaldo($uid); + $urlaubssaldo = "Aktueller Urlaubssaldo: ". $urlaubssaldo->{'AktuellerStand'} . " Tage"; + } + + //Sanchomail mit Vorlage Sancho Mail Urlaub Neu $template_data = array( 'vorgesetzter' => $fullName, 'nameMitarbeiter' => $nameMitarbeiter, 'beschreibung' =>$beschreibung, 'vonDatum' => $von, 'bisDatum' => $bis, - 'Link'=> $link + 'Link'=> $link, + 'urlaubssaldo' => $urlaubssaldo ); @@ -596,6 +609,7 @@ echo ' } }); '; + ?> loadAddons(); +foreach($addon_obj->result as $addon) +{ + if(file_exists('../../../addons/'.$addon->kurzbz.'/cis/init.js.php')) + { + echo ' + '; + } +} // Wenn Seite fertig geladen ist Addons aufrufen echo ' @@ -900,7 +902,7 @@ for ($i=0;$i<6;$i++) if($hgfarbe[$j+7*$i]=='#CDDDEE') { $k=$j+7*$i; - echo ""; + echo ""; echo 'loeschen'; } } diff --git a/config/cis.config-default.inc.php b/config/cis.config-default.inc.php index da3baf507..027af9504 100644 --- a/config/cis.config-default.inc.php +++ b/config/cis.config-default.inc.php @@ -261,5 +261,9 @@ define('CIS_ZEITWUNSCH_GD', false); define('CIS_SHOW_COVID_STATUS', false); //Vertrag Allin -define ('DEFAULT_ALLIN_DIENSTVERTRAG',[110,111]); +define ('DEFAULT_ALLIN_DIENSTVERTRAG',[111]); + +//Echter Dienstvertrag +define ('DEFAULT_ECHTER_DIENSTVERTRAG',[103,111]); + ?> diff --git a/config/vilesci.config-default.inc.php b/config/vilesci.config-default.inc.php index 6ed926b3f..17f668b90 100644 --- a/config/vilesci.config-default.inc.php +++ b/config/vilesci.config-default.inc.php @@ -266,8 +266,9 @@ define('FAS_DOPPELTE_BUCHUNGSTYPEN_CHECK', serialize( // Spezialnoten die am Zeunigs und Diplomasupplement ignoriert werden define('ZEUGNISNOTE_NICHT_ANZEIGEN',serialize(array('iar', 'nz'))); +//Default Lehrmodus +define ('DEFAULT_LEHRMODUS','regulaer'); + //Echter Dienstvertrag define ('DEFAULT_ECHTER_DIENSTVERTRAG',[103,110]); - - ?> From 74fb245757e75b5c6bfd20af9042dc9482ead8ea Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 10 Nov 2022 11:20:36 +0100 Subject: [PATCH 083/138] =?UTF-8?q?26114=20=C3=84nderung=20Mailtext=20Urla?= =?UTF-8?q?ub=20neu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/profile/urlaubstool.php | 85 +++++++++---------- cis/private/profile/zeitsperre_resturlaub.php | 2 +- 2 files changed, 43 insertions(+), 44 deletions(-) diff --git a/cis/private/profile/urlaubstool.php b/cis/private/profile/urlaubstool.php index 42bbe2ec7..cf66953b3 100644 --- a/cis/private/profile/urlaubstool.php +++ b/cis/private/profile/urlaubstool.php @@ -52,8 +52,8 @@ $mehrarbeitsstunden = '0'; $anspruch = '25'; $zaehl=1; $tage=array(); //Array Tage für Kalenderanzeige -$hgfarbe=array_fill(0,44,'#E9ECEE'); //Array mit Hintegrundfarben der Kalenderfelder -$datensatz=array_fill(0,44,0); +$hgfarbe=array_fill(0, 44, '#E9ECEE'); //Array mit Hintegrundfarben der Kalenderfelder +$datensatz=array_fill(0, 44, 0); $freigabevon=array(); $freigabeamum=array(); $vertretung_uid=array(); @@ -125,7 +125,6 @@ if (isset($_GET['hgfarbe'])) } else { - if (!isset($_GET['spmonat'])) { for($i=0;$i<44;$i++) @@ -172,46 +171,46 @@ if (isset($_GET['rechts_x']) || isset($_POST['rechts_x'])) //Eintragung löschen if(isset($_GET['delete'])) { - $zeitsperre = new zeitsperre(); - $zeitsperre->load($_GET['delete']); + $zeitsperre = new zeitsperre(); + $zeitsperre->load($_GET['delete']); - $vondatum = $zeitsperre->getVonDatum(); - $bisdatum = $zeitsperre->getBisDatum(); - $vondatum = $datum_obj->formatDatum($vondatum ,'d.m.Y'); - $bisdatum = $datum_obj->formatDatum($bisdatum,'d.m.Y'); + $vondatum = $zeitsperre->getVonDatum(); + $bisdatum = $zeitsperre->getBisDatum(); + $vondatum = $datum_obj->formatDatum($vondatum ,'d.m.Y'); + $bisdatum = $datum_obj->formatDatum($bisdatum,'d.m.Y'); - if(!$zeitsperre->delete($_GET['delete'])) - { - echo $zeitsperre->errormsg; - } - else - { - //Mail an Vorgesetzten - $prsn = new person(); + if(!$zeitsperre->delete($_GET['delete'])) + { + echo $zeitsperre->errormsg; + } + else + { + //Mail an Vorgesetzten + $prsn = new person(); - $vorgesetzter = $ma->getVorgesetzte($uid); - if($vorgesetzter) - { - $to=''; - $fullName =''; - foreach($ma->vorgesetzte as $vg) - { - if($to!='') - { - $to.=', '.$vg.'@'.DOMAIN; - $name = $prsn->getFullNameFromBenutzer($vg); - $fullName.=', '.$name; - } - else - { - $to.=$vg.'@'.DOMAIN; - $name = $prsn->getFullNameFromBenutzer($vg); - $fullName.=$name; - } - } + $vorgesetzter = $ma->getVorgesetzte($uid); + if($vorgesetzter) + { + $to=''; + $fullName =''; + foreach($ma->vorgesetzte as $vg) + { + if($to!='') + { + $to.=', '.$vg.'@'.DOMAIN; + $name = $prsn->getFullNameFromBenutzer($vg); + $fullName.=', '.$name; + } + else + { + $to.=$vg.'@'.DOMAIN; + $name = $prsn->getFullNameFromBenutzer($vg); + $fullName.=$name; + } + } - $benutzer = new benutzer(); - $benutzer->load($uid); + $benutzer = new benutzer(); + $benutzer->load($uid); //new sanchomail $nameMitarbeiter = $benutzer->vorname. " ". $benutzer->nachname; @@ -238,7 +237,7 @@ if(isset($_GET['delete'])) { $vgmail="
".$p->t('urlaubstool/fehlerBeimSendenAufgetreten',array($fullName))."!"; } - } + } } } @@ -428,7 +427,7 @@ if(isset($_GET['speichern']) && isset($_GET['wtag'])) require_once('../../../addons/casetime/config.inc.php'); require_once('../../../addons/casetime/include/functions.inc.php'); $urlaubssaldo = getCastTimeUrlaubssaldo($uid); - $urlaubssaldo = "Aktueller Urlaubssaldo: ". $urlaubssaldo->{'AktuellerStand'} . " Tage"; + $urlaubssaldo = $urlaubssaldo->{'AktuellerStand'}; } //Sanchomail mit Vorlage Sancho Mail Urlaub Neu @@ -898,12 +897,12 @@ for ($i=0;$i<6;$i++) } elseif(isset($freigabeamum[$j+7*$i])) { - echo 'freigegeben '; + echo 'freigegeben '; if($hgfarbe[$j+7*$i]=='#CDDDEE') { $k=$j+7*$i; echo ""; - echo 'loeschen'; + echo 'loeschen'; } } else diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index 87489d169..01306de98 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -356,7 +356,7 @@ if($addoncasetime) $zeitsaldo = getCaseTimeZeitsaldo($uid); $zeitsaldo = "Aktueller Zeitsaldo: ". $zeitsaldo . " (".formatZeitsaldo($zeitsaldo).")"; $urlaubssaldo = getCastTimeUrlaubssaldo($uid); - $urlaubssaldo = "Aktueller Urlaubssaldo: ". $urlaubssaldo->{'AktuellerStand'} . " Tage"; + $urlaubssaldo = $urlaubssaldo->{'AktuellerStand'}; } //Zeitsperre Speichern From f766f36095f5ff577868667ef878f61d60ff4110 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 10 Nov 2022 11:43:27 +0100 Subject: [PATCH 084/138] =?UTF-8?q?26113=20=C3=84nderung=20Mails=20Zeitsal?= =?UTF-8?q?do?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/profile/zeitsperre_resturlaub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index 01306de98..36271fde2 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -354,7 +354,7 @@ if($addoncasetime) require_once('../../../addons/casetime/config.inc.php'); require_once('../../../addons/casetime/include/functions.inc.php'); $zeitsaldo = getCaseTimeZeitsaldo($uid); - $zeitsaldo = "Aktueller Zeitsaldo: ". $zeitsaldo . " (".formatZeitsaldo($zeitsaldo).")"; + $zeitsaldo = formatZeitsaldo($zeitsaldo); $urlaubssaldo = getCastTimeUrlaubssaldo($uid); $urlaubssaldo = $urlaubssaldo->{'AktuellerStand'}; } From f72afe473c49cb12c9a8fbfc50e7901063dc90d0 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 10 Nov 2022 15:02:13 +0100 Subject: [PATCH 085/138] =?UTF-8?q?26112=20Vilesci-Kein=20L=C3=B6schen=20v?= =?UTF-8?q?on=20Zeitsperren=20bei=20abgeschickter=20Monatsliste=20m=C3=B6g?= =?UTF-8?q?lich?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vilesci/personen/urlaubsverwaltung.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/vilesci/personen/urlaubsverwaltung.php b/vilesci/personen/urlaubsverwaltung.php index fec5222d7..f631aa081 100644 --- a/vilesci/personen/urlaubsverwaltung.php +++ b/vilesci/personen/urlaubsverwaltung.php @@ -70,7 +70,6 @@ if ($addoncasetime) require_once('../../addons/casetime/include/functions.inc.php'); } - //Kopfzeile echo ' @@ -91,7 +90,7 @@ echo ' '; - } + if(file_exists('../../../addons/'.$addon->kurzbz.'/cis/init.js.php')) + { + echo ' + '; + } } // Wenn Seite fertig geladen ist Addons aufrufen @@ -612,57 +609,58 @@ echo ' '; ?> - - - <?php echo $p->t('urlaubstool/urlaubstool');?> - + }, + select: function(event, ui) + { + //Ausgeaehlte Ressource zuweisen und Textfeld wieder leeren + $("#vertretung").val(ui.item.uid); + } + }); +}) + + +<?php echo $p->t('urlaubstool/urlaubstool');?> + ".$p->t('urlaubstool/urlaubstool')." (".$uid.")"; + //Anzeige Resturlaubsberechnung echo ''; echo ''; -for($i=1;$i<=7;$i++) +for($i=1; $i<=7; $i++) echo "\n".''; echo ''; -for ($i=0;$i<6;$i++) +for ($i=0; $i<6; $i++) { echo "\n".''; - for ($j=1;$j<8;$j++) + for ($j=1; $j<8; $j++) { echo "\n"; - if(strlen(stristr($tage[$j+7*$i],"."))>0) + if(strlen(stristr($tage[$j+7*$i], "."))>0) { if($j%6==0 || $j==7) { @@ -866,7 +864,7 @@ for ($i=0;$i<6;$i++) } if($tage[$j+7*$i]!='') { - if($hgfarbe[$j+7*$i]=='#FFFC7F' )//|| $hgfarbe[$j+7*$i]=='#CDDDEE') + if($hgfarbe[$j+7*$i]=='#FFFC7F')//|| $hgfarbe[$j+7*$i]=='#CDDDEE') { echo 't('urlaubstool/erreichbar').': '.$erreichbarkeit_kurzbz[$j+7*$i].'">'.$tage[$j+7*$i].'
';; $k=$j+7*$i; @@ -876,16 +874,16 @@ for ($i=0;$i<6;$i++) elseif($hgfarbe[$j+7*$i]=='#E9ECEE') { echo ''.$tage[$j+7*$i].'
'; - if(strlen(stristr($tage[$j+7*$i],"."))>0) + if(strlen(stristr($tage[$j+7*$i], "."))>0) { echo ''; + value="'.date("Y-m-d", mktime(0, 0, 0, substr($tage[$j+7*$i], 3, 2), substr($tage[$j+7*$i], 0, 2), substr($tage[$j+7*$i], 6, 4))).'" + id="'.date("d.m.Y", mktime(0, 0, 0, substr($tage[$j+7*$i], 3, 2), substr($tage[$j+7*$i], 0, 2), substr($tage[$j+7*$i], 6, 4))).'">'; } else { - echo ''; + echo ''; } } else @@ -897,12 +895,12 @@ for ($i=0;$i<6;$i++) } elseif(isset($freigabeamum[$j+7*$i])) { - echo 'freigegeben '; + echo 'freigegeben '; if($hgfarbe[$j+7*$i]=='#CDDDEE') { $k=$j+7*$i; echo ""; - echo 'loeschen'; + echo 'loeschen'; } } else From 7df957648198ba37ffbefed49224240bdc5ca570 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Fri, 11 Nov 2022 15:02:39 +0100 Subject: [PATCH 088/138] add tabulator header filters to logsviewer --- public/js/apps/LogsViewer/TabulatorSetup.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public/js/apps/LogsViewer/TabulatorSetup.js b/public/js/apps/LogsViewer/TabulatorSetup.js index 7d98ba2f6..2ec3cc9d4 100644 --- a/public/js/apps/LogsViewer/TabulatorSetup.js +++ b/public/js/apps/LogsViewer/TabulatorSetup.js @@ -22,13 +22,13 @@ export const LogsViewerTabulatorOptions = { height: 700, layout: 'fitColumns', columns: [ - {title: 'Log ID', field: 'LogId'}, - {title: 'Request ID', field: 'RequestId'}, - {title: 'Execution time', field: 'ExecutionTime'}, - {title: 'Executed by', field: 'ExecutedBy'}, - {title: 'Description', field: 'Description'}, - {title: 'Data', field: 'Data'}, - {title: 'Web service type', field: 'WebserviceType'} + {title: 'Log ID', field: 'LogId', headerFilter: true}, + {title: 'Request ID', field: 'RequestId', headerFilter: true}, + {title: 'Execution time', field: 'ExecutionTime', headerFilter: true}, + {title: 'Executed by', field: 'ExecutedBy', headerFilter: true}, + {title: 'Description', field: 'Description', headerFilter: true}, + {title: 'Data', field: 'Data', headerFilter: true}, + {title: 'Web service type', field: 'WebserviceType', headerFilter: true} ], rowFormatter: function(row) { if (row.getData().RequestId.includes("error")) From 471242cb97db79a43831a4886cde49b50c399894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Fri, 11 Nov 2022 15:03:48 +0100 Subject: [PATCH 089/138] Added Index for tbl_webservicelog.execute_time to increase performance --- system/dbupdate_3.4.php | 2 ++ .../dbupdate_3.4/26173_index_webservicelog.php | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 system/dbupdate_3.4/26173_index_webservicelog.php diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index c3600d250..9d89de0d1 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -28,6 +28,8 @@ require_once('dbupdate_3.4/example2.php'); ... */ +require_once('dbupdate_3.4/26173_index_webservicelog.php'); + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/dbupdate_3.4/26173_index_webservicelog.php b/system/dbupdate_3.4/26173_index_webservicelog.php new file mode 100644 index 000000000..6eb2b06e8 --- /dev/null +++ b/system/dbupdate_3.4/26173_index_webservicelog.php @@ -0,0 +1,16 @@ +db_query("SELECT * FROM pg_class WHERE relname='idx_webserivcelog_executetime'")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "CREATE INDEX idx_webserivcelog_executetime ON system.tbl_webservicelog USING btree (execute_time)"; + + if (! $db->db_query($qry)) + echo 'Indizes: ' . $db->db_last_error() . '
'; + else + echo 'Index fuer system.tbl_webservicelog.execute_time hinzugefuegt'; + } +} From 2c743cb37bd03afc2c770633ed03bcd8e5d89ab0 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Fri, 11 Nov 2022 23:41:12 +0100 Subject: [PATCH 090/138] studentenmeldung.php: Export of Bewerberdaten works for allBaMa and Studiengaenge --- vilesci/bis/studentenmeldung.php | 95 ++++++++++++++++++++------------ 1 file changed, 59 insertions(+), 36 deletions(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index 140108a12..d085a4ed9 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -353,9 +353,10 @@ else if($result = $db->db_query($qry)) { - $stg_kz_index = ''; + $num_rows = $db->db_num_rows($result); + $row_num = 1; while($row = $db->db_fetch_object($result)) { $row->pre_foerderrelevant = $db->db_parse_bool($row->pre_foerderrelevant); @@ -367,8 +368,6 @@ if($result = $db->db_query($qry)) $stg_obj = new studiengang(); if($stg_obj->load($row->studiengang_kz)) { - - $maxsemester = $stg_obj->max_semester; if($maxsemester == 0) { @@ -410,42 +409,62 @@ if($result = $db->db_query($qry)) $datei .= $header; $dateiNurBewerber .= $header; } - if ($stg_kz_index != '' && $row->studiengang_kz != $stg_kz_index) + } + + //Bewerberblock bei neuem Studiengang, und am Ende noch einmal + if (($stg_kz_index != '' && $row->studiengang_kz != $stg_kz_index) || $row_num == $num_rows) + { + // (bei Ausserordentlichen nicht anzeigen) + if($row->studiengang_kz!=('9'.$erhalter)) { - $datei .= " - "; + $stg_obj = new studiengang(); + + if($orgform_code==3 || $stg_obj->isMischform($row->studiengang_kz,$ssem) || $stg_obj->isMischform($row->studiengang_kz,$psem)) + { + $orgcodes = array_unique($orgform_code_array); + //Mischform + foreach($orgcodes as $code) + { + $bewerberBlock=GenerateXMLBewerberBlock($row->studiengang_kz, $code); + $datei.=$bewerberBlock; + $dateiNurBewerber.=$bewerberBlock; + } + } + else + { + $bewerberBlock=GenerateXMLBewerberBlock($row->studiengang_kz); + $datei.=$bewerberBlock; + $dateiNurBewerber.=$bewerberBlock; + } } - $stg_kz_index = $row->studiengang_kz; - $datei .= " + } + + // wenn neuer Studiengang... + if ($row->studiengang_kz != $stg_kz_index) + { + // ...Studiengang Tag schliessen + if ($stg_kz_index != '') + { + $stgClose = " + "; + $datei .= $stgClose; + $dateiNurBewerber .= $stgClose; + } + + // ...neuen Studiengang Tag öffnen + $stgOpen = " ".$row->studiengang_kz.""; + $datei .= $stgOpen; + $dateiNurBewerber .= $stgOpen; } + // Student Daten schreiben $datei .= GenerateXMLStudentBlock($row); + + // Studiengang kz speichern und Zeile erhöhen + $stg_kz_index = $row->studiengang_kz; + $row_num++; } - - //Bewerberblock bei Ausserordentlichen nicht anzeigen - /*if($stg_kz!=('9'.$erhalter)) - { - $stg_obj = new studiengang(); - - if($orgform_code==3 || $stg_obj->isMischform($stg_kz,$ssem) || $stg_obj->isMischform($stg_kz,$psem)) - { - $orgcodes = array_unique($orgform_code_array); - //Mischform - foreach($orgcodes as $code) - { - $bewerberBlock=GenerateXMLBewerberBlock($code); - $datei.=$bewerberBlock; - $dateiNurBewerber.=$bewerberBlock; - } - } - else - { - $bewerberBlock=GenerateXMLBewerberBlock(); - $datei.=$bewerberBlock; - $dateiNurBewerber.=$bewerberBlock; - } - }*/ } $footer=" @@ -722,8 +741,11 @@ if(file_exists($ddd)) { echo 'BIS-Meldung Stg '.$stg_kz.' archivieren
'; echo 'XML-Datei für BIS-Meldung Stg '.$stg_kz.'
'; - echo 'XML-Datei für BIS-Meldung Stg '.$stg_kz.' - nur Bewerberdaten
'; } + +if(file_exists($dddNurBew)) + echo 'XML-Datei für BIS-Meldung Stg '.$stg_kz.' - nur Bewerberdaten
'; + if(file_exists($eee)) { echo 'BIS-Meldeübersicht der BIS-Meldung Stg '.$stg_kz.'

'; @@ -1901,11 +1923,11 @@ function GenerateXMLStudentBlock($row) * Wenn der Parameter orgformcode uebergeben wird, werden nur die Bewerberzahlen dieser Orgform geliefert * sonst alle */ -function GenerateXMLBewerberBlock($orgformcode=null) +function GenerateXMLBewerberBlock($studiengang_kz, $orgformcode=null) { global $db; global $ssem, $stgart, $psem; - global $stg_kz, $bisdatum; + global $bisdatum; global $bwlist, $orgform_kurzbz; global $bewerbercount,$orgform_code_array; $datei = ''; @@ -1924,11 +1946,12 @@ function GenerateXMLBewerberBlock($orgformcode=null) JOIN public.tbl_person USING(person_id) LEFT JOIN bis.tbl_orgform USING(orgform_kurzbz) WHERE (studiensemester_kurzbz=".$db->db_add_param($ssem)." OR studiensemester_kurzbz=".$db->db_add_param($psem).") - AND tbl_prestudent.studiengang_kz=".$db->db_add_param($stg_kz)." + AND tbl_prestudent.studiengang_kz=".$db->db_add_param($studiengang_kz)." AND (tbl_prestudentstatus.datum<=".$db->db_add_param($bisdatum).") AND status_kurzbz='Bewerber' AND reihungstestangetreten "; + if(!is_null($orgformcode)) $qrybw.=" AND tbl_orgform.code=".$db->db_add_param($orgformcode); From 048c16439402c9a6ec8986899fb49223fc78522e Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Mon, 14 Nov 2022 17:57:20 +0100 Subject: [PATCH 091/138] studentenmeldung.php: correct order - Studenten first, then Bewerber --- vilesci/bis/studentenmeldung.php | 57 ++++++++++++++++---------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index d085a4ed9..5cf04de0d 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -351,6 +351,12 @@ else "; } +$header = " + + ".$erhalter." + ".date("dmY", $datumobj->mktime_fromdate($bisdatum))." + "; + if($result = $db->db_query($qry)) { $stg_kz_index = ''; @@ -397,23 +403,24 @@ if($result = $db->db_query($qry)) else die('Fehler:'.$stg_obj->errormsg); - // Header am Beginn rausschreiben + // Erstes Studiengang Tag am Beginn rausschreiben if ($stg_kz_index == '') { - $header = " - - ".$erhalter." - ".date("dmY", $datumobj->mktime_fromdate($bisdatum))." - "; - + $header .= " + + ".$row->studiengang_kz.""; $datei .= $header; $dateiNurBewerber .= $header; } } - //Bewerberblock bei neuem Studiengang, und am Ende noch einmal - if (($stg_kz_index != '' && $row->studiengang_kz != $stg_kz_index) || $row_num == $num_rows) + // Student Daten schreiben + $datei .= GenerateXMLStudentBlock($row); + + // wenn neuer Studiengang oder letzter Durchlauf... + if ($stg_kz_index != '' && ($row->studiengang_kz != $stg_kz_index || $row_num == $num_rows)) { + //Bewerberblock bei neuem Studiengang, und am Ende noch einmal // (bei Ausserordentlichen nicht anzeigen) if($row->studiengang_kz!=('9'.$erhalter)) { @@ -437,29 +444,24 @@ if($result = $db->db_query($qry)) $dateiNurBewerber.=$bewerberBlock; } } + + // ...Studiengang Tag schliessen + $stgClose = " + "; + $datei .= $stgClose; + $dateiNurBewerber .= $stgClose; } // wenn neuer Studiengang... - if ($row->studiengang_kz != $stg_kz_index) + if ($stg_kz_index != '' && $row->studiengang_kz != $stg_kz_index) { - // ...Studiengang Tag schliessen - if ($stg_kz_index != '') - { - $stgClose = " -
"; - $datei .= $stgClose; - $dateiNurBewerber .= $stgClose; - } - - // ...neuen Studiengang Tag öffnen - $stgOpen = " - - ".$row->studiengang_kz.""; - $datei .= $stgOpen; - $dateiNurBewerber .= $stgOpen; + // ...neuen Studiengang Tag öffnen + $stgOpen = " + + ".$row->studiengang_kz.""; + $datei .= $stgOpen; + $dateiNurBewerber .= $stgOpen; } - // Student Daten schreiben - $datei .= GenerateXMLStudentBlock($row); // Studiengang kz speichern und Zeile erhöhen $stg_kz_index = $row->studiengang_kz; @@ -468,7 +470,6 @@ if($result = $db->db_query($qry)) } $footer=" - "; From 8bbbd8cb8d2354078a9c0456ae64eebfa37bf99d Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Mon, 14 Nov 2022 18:13:49 +0100 Subject: [PATCH 092/138] studentenmeldung bugfix: Erhalter Kz is correctly exported --- vilesci/bis/studentenmeldung.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index 5cf04de0d..ec4102a7b 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -351,12 +351,6 @@ else "; } -$header = " - - ".$erhalter." - ".date("dmY", $datumobj->mktime_fromdate($bisdatum))." - "; - if($result = $db->db_query($qry)) { $stg_kz_index = ''; @@ -406,7 +400,11 @@ if($result = $db->db_query($qry)) // Erstes Studiengang Tag am Beginn rausschreiben if ($stg_kz_index == '') { - $header .= " + $header = " + + ".$erhalter." + ".date("dmY", $datumobj->mktime_fromdate($bisdatum))." + ".$row->studiengang_kz.""; $datei .= $header; From d84f53e5c314a071871126efbbb1f34c37c34010 Mon Sep 17 00:00:00 2001 From: Manfred Date: Thu, 17 Nov 2022 13:57:52 +0100 Subject: [PATCH 093/138] =?UTF-8?q?GS-Button=20zum=20Kopieren=20bestehende?= =?UTF-8?q?r=20Eintr=C3=A4ge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/student/studentmobilitaetoverlay.js.php | 12 ++++++++++-- content/student/studentmobilitaetoverlay.xul.php | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/content/student/studentmobilitaetoverlay.js.php b/content/student/studentmobilitaetoverlay.js.php index ee8f58e24..15fd17fa7 100644 --- a/content/student/studentmobilitaetoverlay.js.php +++ b/content/student/studentmobilitaetoverlay.js.php @@ -184,12 +184,13 @@ function StudentMobilitaetDisableFields(val) document.getElementById('student-mobilitaet-menulist-status').disabled=val; document.getElementById('student-mobilitaet-textbox-ausbildungssemester').disabled=val; document.getElementById('student-mobilitaet-button-speichern').disabled=val; + document.getElementById('student-mobilitaet-button-kopie-speichern').disabled=val; } // **** // * Speichert den Mobilitaet Datensatz // **** -function StudentMobilitaetSpeichern() +function StudentMobilitaetSpeichern(newval) { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); @@ -200,7 +201,14 @@ function StudentMobilitaetSpeichern() var gsprogramm = document.getElementById('student-mobilitaet-menulist-gsprogramm').value; var mobilitaetsprogramm = document.getElementById('student-mobilitaet-menulist-mobilitaetsprogramm').value; var studiensemester = document.getElementById('student-mobilitaet-menulist-studiensemester').value; - var neu = document.getElementById('student-mobilitaet-detail-checkbox-neu').checked; + if (newval == true) + { + var neu = true; + } + else + { + var neu = document.getElementById('student-mobilitaet-detail-checkbox-neu').checked; + } var prestudent_id = document.getElementById('student-mobilitaet-detail-textbox-prestudent_id').value; var mobilitaet_id = document.getElementById('student-mobilitaet-detail-textbox-mobilitaet_id').value; diff --git a/content/student/studentmobilitaetoverlay.xul.php b/content/student/studentmobilitaetoverlay.xul.php index b6714fb8f..889da1636 100644 --- a/content/student/studentmobilitaetoverlay.xul.php +++ b/content/student/studentmobilitaetoverlay.xul.php @@ -215,6 +215,7 @@ 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)
+ + + + + + + + From 41eaee41affe657a50c7a5b6311fad15aa2bd6f5 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Thu, 1 Dec 2022 17:18:18 +0100 Subject: [PATCH 108/138] getIncomingOrGsFoerderrelevant: studiensemester is checked only for prestudent status --- .../libraries/issues/PlausicheckLib.php | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/application/libraries/issues/PlausicheckLib.php b/application/libraries/issues/PlausicheckLib.php index 07f091208..5105169dd 100644 --- a/application/libraries/issues/PlausicheckLib.php +++ b/application/libraries/issues/PlausicheckLib.php @@ -1169,9 +1169,9 @@ class PlausicheckLib * @param prestudent_id int if check is to be executed only for one prestudent * @return object success or error */ - public function getIncomingOrGsFoerderrelevant($studiensemester_kurzbz, $studiengang_kz = null, $prestudent_id = null) + public function getIncomingOrGsFoerderrelevant($studiensemester_kurzbz = null, $studiengang_kz = null, $prestudent_id = null) { - $params = array($studiensemester_kurzbz, $studiensemester_kurzbz); + $params = array(); $qry = " SELECT @@ -1184,19 +1184,11 @@ class PlausicheckLib JOIN public.tbl_benutzer ON(student_uid=uid) JOIN public.tbl_person pers USING(person_id) JOIN public.tbl_prestudent ps USING(prestudent_id) + JOIN public.tbl_prestudentstatus status USING(prestudent_id) JOIN public.tbl_studiengang stg ON(stg.studiengang_kz=stud.studiengang_kz) WHERE ( - EXISTS - ( - SELECT 1 - FROM - public.tbl_prestudentstatus - WHERE - prestudent_id = ps.prestudent_id - AND status_kurzbz = 'Incoming' - AND studiensemester_kurzbz = ? - ) + status.status_kurzbz = 'Incoming' OR EXISTS ( SELECT 1 FROM @@ -1205,13 +1197,18 @@ class PlausicheckLib WHERE prestudent_id = ps.prestudent_id AND gsstudientyp_kurzbz = 'Extern' - AND studiensemester_kurzbz = ? ) ) AND (ps.foerderrelevant <> FALSE OR ps.foerderrelevant IS NULL) AND bismelden=TRUE AND stg.melderelevant"; + if (isset($studiensemester_kurzbz)) + { + $qry .= " AND status.studiensemester_kurzbz = ?"; + $params[] = $studiensemester_kurzbz; + } + if (isset($studiengang_kz)) { $qry .= " AND stg.studiengang_kz = ?"; From ad19e0ed75f93a1f46b8687148a1ef225f3f57ba Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 12 Dec 2022 07:55:36 +0100 Subject: [PATCH 109/138] - 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 ' +
'; @@ -708,7 +706,7 @@ echo ' style="vertical-align: middle;" alt="links">  \n"; echo ' '; echo ' '; //Tage -$mbeginn=mktime(0, 0, 0, ($wmonat+1) , 1, $jahre[$wjahr]); +$mbeginn=mktime(0, 0, 0, ($wmonat+1), 1, $jahre[$wjahr]); $ttt=getdate($mbeginn); $wotag="$ttt[wday]"; if ($wotag==0) @@ -786,9 +784,9 @@ else { $mendev = cal_days_in_month(CAL_GREGORIAN, ($wmonat), $jahre[$wjahr]); } -$ttt=getdate(mktime(0, 0, 0, ($wmonat+1) , $mende, $jahre[$wjahr])); +$ttt=getdate(mktime(0, 0, 0, ($wmonat+1), $mende, $jahre[$wjahr])); //echo "monatsende:".$mende; -for($i=1;$i<43;$i++) +for($i=1; $i<43; $i++) { if($i>=$wotag && $zaehl<=$mende) { @@ -799,22 +797,22 @@ for($i=1;$i<43;$i++) { if($wmonat==0) { - $tage[$i]=date("d.m.Y", mktime(0, 0, 0, 12 , $mendev+$i-($wotag-1), $jahre[$wjahr]-1)); + $tage[$i]=date("d.m.Y", mktime(0, 0, 0, 12, $mendev+$i-($wotag-1), $jahre[$wjahr]-1)); } else { - $tage[$i]=date("d.m.Y", mktime(0, 0, 0, ($wmonat) , $mendev+$i-($wotag-1), $jahre[$wjahr])); + $tage[$i]=date("d.m.Y", mktime(0, 0, 0, ($wmonat), $mendev+$i-($wotag-1), $jahre[$wjahr])); } } elseif ($i>$mende && $i<=$mende+($wotag-1)+(7-($ttt['wday']==0?7:$ttt['wday']))) { if($wmonat==11) { - $tage[$i]=date("d.m.Y", mktime(0, 0, 0, 1 , $i-$mende-$wotag+1, $jahre[$wjahr+1])); + $tage[$i]=date("d.m.Y", mktime(0, 0, 0, 1, $i-$mende-$wotag+1, $jahre[$wjahr+1])); } else { - $tage[$i]=date("d.m.Y", mktime(0, 0, 0, ($wmonat+2) , $i-$mende-$wotag+1, $jahre[$wjahr])); + $tage[$i]=date("d.m.Y", mktime(0, 0, 0, ($wmonat+2), $i-$mende-$wotag+1, $jahre[$wjahr])); } } else @@ -832,17 +830,17 @@ echo '
'.$tagbez[$lang->index][$i].'
Zugangsüberprüfung + zugangs_ueberpruefung ? 'checked="checked"' : '' ?>> +
Zugangscode + (Verpflichtend, wenn die Zugangsüberprüfung aktiviert ist) +