From 9b3b571bd9127dc5e18dcc806574107e53f7218b Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 6 Oct 2022 08:55:11 +0200 Subject: [PATCH 001/221] Erweiterung Phrasen --- locale/de-AT/benotungstool.php | 1 + locale/en-US/benotungstool.php | 1 + 2 files changed, 2 insertions(+) diff --git a/locale/de-AT/benotungstool.php b/locale/de-AT/benotungstool.php index 3c8063936..a38aa31f3 100644 --- a/locale/de-AT/benotungstool.php +++ b/locale/de-AT/benotungstool.php @@ -171,6 +171,7 @@ $this->phrasen['benotungstool/zeunis']='Zeugnis'; $this->phrasen['benotungstool/handbuch']='Handbuch'; $this->phrasen['benotungstool/punkte']='Punkte'; $this->phrasen['benotungstool/importAnweisung']='Kopieren Sie die Spalten Personenkennzeichen und Note aus der Notenliste (bzw. StudentenUid und Note aus dem MoodleExport) und fügen Sie diese in folgendes Feld ein'; +$this->phrasen['benotungstool/importAnweisungNachp']='Kopieren Sie die Spalten Personenkennzeichen, Datum und Note aus der Notenliste (bzw. StudentenUid, Datum und Note aus dem MoodleExport) und fügen Sie diese in folgendes Feld ein'; $this->phrasen['benotungstool/pruefung']='Prüfung'; $this->phrasen['benotungstool/notenlisteImport']='Notenliste für den LV-Noten-Import (Excel)'; $this->phrasen['benotungstool/bearbeitetvon']='Bearbeitet von'; diff --git a/locale/en-US/benotungstool.php b/locale/en-US/benotungstool.php index 17f78d2ba..72f29256e 100644 --- a/locale/en-US/benotungstool.php +++ b/locale/en-US/benotungstool.php @@ -170,6 +170,7 @@ $this->phrasen['benotungstool/zeunis']='Transcript'; $this->phrasen['benotungstool/handbuch']='Handbook'; $this->phrasen['benotungstool/punkte']='Points'; $this->phrasen['benotungstool/importAnweisung']='Copy the columns "personal identifier" and "grade" from the grade list (or "student ID number" and "grade" from the moodle export file) and insert them in the following field'; +$this->phrasen['benotungstool/importAnweisungNachp']='Copy the columns "personal identifier", "date" and "grade" from the grade list (or "student ID number", "date" and "grade" from the moodle export file) and insert them in the following field'; $this->phrasen['benotungstool/pruefung']='Examination'; $this->phrasen['benotungstool/notenlisteImport']='Grade list for the subject grade import (Excel)'; $this->phrasen['benotungstool/geaenderteNotenVorhanden']='There are changed grades. Please send the changes to the assistant by clicking "Approval"'; From 54411f4de776fe238e6bd78d5b570f5f1e371bfb Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 12 Oct 2022 15:06:07 +0200 Subject: [PATCH 002/221] Benotungstool: Importfunktion Termin2 --- .../benotungstool/lvgesamtnoteverwalten.php | 144 ++++++- .../benotungstool/nachpruefungeintragen.php | 390 +++++++++++------- 2 files changed, 392 insertions(+), 142 deletions(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index 916f2b4e3..6a160c646 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -402,6 +402,7 @@ foreach ($noten_obj->result as $row) url += '&typ='+typ; url += '&'+ts; + $.ajax({ type:"GET", url: url, @@ -602,6 +603,42 @@ foreach ($noten_obj->result as $row) $('#noteimporttextarea').focus(); } + // **** + // * Oeffnet ein Fenster fuer den Import von Noten für die Nachprüfung aus dem Excel + // **** + function GradeImportNachp() + { + var str = "
"; + str += ""; + var anlegendiv = document.getElementById("nachpruefung_div"); + var y = getOffset('y'); y = y+50; anlegendiv.style.top = y+"px"; + str += ''; + str += ''; + str += "
X
t('benotungstool/importAnweisungNachp');?>:
' onclick='saveGradeBulkNachp(\"Termin2\");'>"; + str += "
"; + anlegendiv.innerHTML = str; + anlegendiv.style.visibility = "visible"; + $('#noteimporttextareaNachp').focus(); + } + + // **** + // * Oeffnet ein Fenster fuer den Import von Noten für Termin3 aus dem Excel + // **** + function GradeImportTermin3() + { + var str = "
"; + str += ""; + var anlegendiv = document.getElementById("nachpruefung_div"); + var y = getOffset('y'); y = y+50; anlegendiv.style.top = y+"px"; + str += ''; + str += ''; + str += "
X
t('benotungstool/importAnweisungNachp');?>:
' onclick='saveGradeBulkNachp(\"Termin3\");'>"; + str += "
"; + anlegendiv.innerHTML = str; + anlegendiv.style.visibility = "visible"; + $('#noteimporttextareaTermin3').focus(); + } + // Speichert die Noten ueber den Import function saveGradeBulk() { @@ -698,6 +735,105 @@ foreach ($noten_obj->result as $row) } } + // Speichert die Noten der Nachprüfung ueber den Import + function saveGradeBulkNachp(typ) + { + data = $('#noteimporttextareaNachp').val(); + closeDiv(); + + //Reihen ermitteln + var rows = data.split("\n"); + var i=0; + var params=''; + alertMsg = ''; + + var gradedata = {}; + var validGrades = ''; + + result as $row_note) + { + if ($row_note->lehre && $row_note->aktiv) + $gradesArray[] = '"' . $row_note->anmerkung . '"'; + } + // Output JS variable with valid grades + echo 'var validGrades = [' . implode(',', $gradesArray) . '];'; + } + ?> + + for(row in rows) + { + zeile = rows[row].split(" "); + + + + if (zeile[0]!='' && zeile[1]!='' && zeile[2]!='') + { + gradedata['student_uid_'+i]=zeile[0]; + gradedata['datumNachp_'+i]=zeile[1]; + + + i++; + } + } + + if (alertMsg != "") + alert(alertMsg); + + if (i>0) + { + + var jetzt = new Date(); + var ts = jetzt.getTime(); + var url= ''; + url += '&sammel=1'; + url += '&typ=' + typ; + url += '&submit=1&'+ts; + $.ajax({ + type:"POST", + url: url, + data: gradedata, + success:function(result) + { + var resp = result; + if (resp!='') + { + alert(resp); + } + window.location.reload(); + }, + error:function(result) + { + alert('Request Nachprüfung fehlgeschlagen'); + } + }); + + } + else + { + alert('t('benotungstool/hilfeImport');?>'); + } + } + //--> @@ -1052,11 +1188,15 @@ $htmlstring .= "" . $p->t('benotungstool/punkte') . ' / ' . $p->t('benotungs if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2) { - $htmlstring .= "" . $p->t('benotungstool/nachpruefung') . ""; + $htmlstring .= "
" . $p->t('benotungstool/nachpruefung') . "
+ + "; } if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) { - $htmlstring .= "" . $p->t('benotungstool/nachpruefung2') . ""; + $htmlstring .= "
" . $p->t('benotungstool/nachpruefung') . "
+ + "; } if (defined('CIS_GESAMTNOTE_PRUEFUNG_KOMMPRUEF') && CIS_GESAMTNOTE_PRUEFUNG_KOMMPRUEF) { diff --git a/cis/private/lehre/benotungstool/nachpruefungeintragen.php b/cis/private/lehre/benotungstool/nachpruefungeintragen.php index 0ad985e76..81545a7f6 100644 --- a/cis/private/lehre/benotungstool/nachpruefungeintragen.php +++ b/cis/private/lehre/benotungstool/nachpruefungeintragen.php @@ -41,10 +41,15 @@ require_once('../../../../include/benutzerfunktion.class.php'); require_once('../../../../include/benutzer.class.php'); require_once('../../../../include/student.class.php'); require_once('../../../../include/notenschluessel.class.php'); +require_once('../../../../include/phrasen.class.php'); + if (!$db = new basis_db()) die('Fehler beim Herstellen der Datenbankverbindung'); +$sprache = getSprache(); +$p = new phrasen($sprache); + $user = get_uid(); if(!check_lektor($user)) @@ -52,6 +57,7 @@ if(!check_lektor($user)) $lehreinheit_id=''; +$lehreinheit_id_pr=''; if(isset($_GET['lvid']) && is_numeric($_GET['lvid'])) //Lehrveranstaltung_id $lvid = $_GET['lvid']; @@ -62,60 +68,17 @@ if(isset($_GET['lehreinheit_id']) && is_numeric($_GET['lehreinheit_id'])) //Lehr $lehreinheit_id = $_GET['lehreinheit_id']; if(isset($_GET['lehreinheit_id_pr']) && is_numeric($_GET['lehreinheit_id_pr'])) //Lehreinheit_id der pruefung - $lehreinheit_id = $_GET['lehreinheit_id_pr']; - -if(isset($_GET['datum'])) -{ - $datum = $_GET['datum']; - $datum_obj = new datum(); - $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); -} -else - die('Fehlerhafte Parameteruebergabe'); - -//Laden der Lehrveranstaltung -$lv_obj = new lehrveranstaltung(); -if(!$lv_obj->load($lvid)) - die($lv_obj->errormsg); - -//Studiengang laden -$stg_obj = new studiengang($lv_obj->studiengang_kz); + $lehreinheit_id_pr = $_GET['lehreinheit_id_pr']; if(isset($_GET['stsem'])) $stsem = $_GET['stsem']; else $stsem = ''; - -$uebung_id = (isset($_GET['uebung_id'])?$_GET['uebung_id']:''); -$uid = (isset($_GET['uid'])?$_GET['uid']:''); - //Studiensemester laden $stsem_obj = new studiensemester(); if($stsem=='') $stsem = $stsem_obj->getaktorNext(); -$student_uid = $_REQUEST["student_uid"]; - -$note = $_REQUEST["note"]; -if(isset($_REQUEST['punkte'])) - $punkte = $_REQUEST['punkte']; -else - $punkte = ''; - -$punkte = str_replace(',','.',$punkte); - -if($punkte!='') -{ - // Bei Punkteeingabe wird die Note nochmals geprueft und ggf korrigiert - $notenschluessel = new notenschluessel(); - $note_pruef = $notenschluessel->getNote($punkte, $lvid, $stsem); - if($note_pruef!=$note) - { - $note = $note_pruef; - $note_dirty=true; - } -} - if(!isset($_GET['typ'])) { $typ='Termin2'; @@ -128,16 +91,151 @@ else die('Typ ist ungueltig'); } -if($note=='') - $note = 9; - -$old_note = $note; - -// lvgesamtnote für studenten speichern -if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') ) +if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) +{ + foreach ($_POST as $row=>$val) + { + if(mb_strstr(mb_strtolower($row), 'student_uid_')) + { + $id=mb_substr($row, mb_strlen('student_uid_')); + + $student_uid = $_POST['student_uid_'.$id]; + $note = null; + $punkte = null; + $datum = null; + if(isset($_POST['note_'.$id])) + $note = $_POST['note_'.$id]; + elseif(isset($_POST['punkte_'.$id])) + $punkte = $_POST['punkte_'.$id]; + else + { + $response.="\nNote oder Punkte fehlen"; + continue; + } + $punkte=str_replace(',','.', $punkte); + + $datum = $_POST['datumNachp_'.$id]; + + // //check ob Matrikelnummer anstelle der student_uid übergeben wurde + // + // + // $student = new student(); + // + // + // $response2 = true; + // if (!$student->checkIfValidStudentUID($student_uid)) + // { + // //UID ermitteln + // if(!$student_uid = $student->getUidFromMatrikelnummer($student_uid)) + // { + // $response2 = false; + // $response2.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($student_uid)); + // continue; + // } + // } + + + $lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem); + + if(isset($_POST['student_uid_'.$id]) && (isset($_POST['note_'.$id]) || isset($_POST['punkte_'.$id])) && isset($_POST['datumNachp_'.$id])) + { + // echo "\ndb " . " lvid ". $lvid . " note " . $note . " student_uid " . $student_uid . " datum " . $datum . " studiensem " . + // $stsem . " lehreinheit_id_pr " . $lehreinheit_id . " typ " . $typ . "\n"; + + $response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte); + + echo "\ndb " . " lvid ". $lvid . " note " . $note . " student_uid " . $student_uid . " datum " . $datum . " studiensem " . + $stsem . " lehreinheit_id_pr " . $lehreinheit_id . " typ " . $typ . " response" . $response . "\n"; + // echo $response; + + } + else + { + echo "\n fehlende oder fehlerhafte Inputparameter"; + } + } + } + +} +else +{ + // Einzelupdate + + if(isset($_GET['datum']) ) + { + $datum = $_GET['datum']; + $datum_obj = new datum(); + $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); + } + + // echo "Variante Einzel"; + else + die('Fehlerhafte Parameteruebergabe'); + + $student_uid = $_REQUEST["student_uid"]; + + $note = $_REQUEST["note"]; + if(isset($_REQUEST['punkte'])) + $punkte = $_REQUEST['punkte']; + else + $punkte = ''; + + $punkte = str_replace(',','.',$punkte); + + if($punkte!='') + { + // Bei Punkteeingabe wird die Note nochmals geprueft und ggf korrigiert + $notenschluessel = new notenschluessel(); + $note_pruef = $notenschluessel->getNote($punkte, $lvid, $stsem); + if($note_pruef!=$note) + { + $note = $note_pruef; + $note_dirty=true; + } + } + + if($note=='') + $note = 9; + + $old_note = $note; + + //Laden der Lehrveranstaltung + $lv_obj = new lehrveranstaltung(); + if(!$lv_obj->load($lvid)) + die($lv_obj->errormsg); + + //Studiengang laden + $stg_obj = new studiengang($lv_obj->studiengang_kz); + + $uebung_id = (isset($_GET['uebung_id'])?$_GET['uebung_id']:''); + $uid = (isset($_GET['uid'])?$_GET['uid']:''); + + // lvgesamtnote für studenten speichern + if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') ) + { + // Die Pruefung muss einer Lehreinheit zugeordnet werden + // deshalb wird hier versucht eine passende Lehreinheit zu ermitteln. + + $lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem); + + $response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note); + echo $response; + } + else + echo "Fehler beim Eintragen der Prüfungen"; + +} + +/** + * Berechnet Lehreinheit auf Basis LV-Daten + * @param string $db Datenbankvariable + * @param string $student_uid student_uid + * @param int $lvid Lehrveranstaltungsid + * @param string $stsem Studiensemester im Format 'WSYYYY' + * @return String LehreinheitId + */ +function getLehreinheit($db, $lvid, $student_uid, $stsem) { - // Die Pruefung muss einer Lehreinheit zugeordnet werden - // deshalb wird hier versucht eine passende Lehreinheit zu ermitteln. $le_arr = array(); $qry_stud = "SELECT lehreinheit_id, lehrform_kurzbz FROM @@ -158,104 +256,117 @@ if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') ) } } - if (!in_array($lehreinheit_id,$le_arr)) + //if (!in_array($lehreinheit_id,$le_arr)) $lehreinheit_id = $le_arr[0]; + return $lehreinheit_id; +} + +/** + * Prüfung speichern + */ +function savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte=null) +{ $jetzt = date("Y-m-d H:i:s"); + global $user; //, $note, $punkte, $datum; - $pr = new Pruefung(); - - // Wenn eine Pruefung angelegt wird, wird zuerst eine Pruefung mit 1. Termin angelegt - // und dort die Zeugnisnote gespeichert - if($pr->getPruefungen($student_uid, "Termin1", $lvid, $stsem)) + if ($typ == "Termin2") { - if ($pr->result) + $pr = new Pruefung(); + // Wenn eine Pruefung angelegt wird, wird zuerst eine Pruefung mit 1. Termin angelegt + // und dort die Zeugnisnote gespeichert + if($pr->getPruefungen($student_uid, "Termin1", $lvid, $stsem)) { - $termin1 = 1; - } - else - { - $lvnote = new lvgesamtnote(); - if ($lvnote->load($lvid, $student_uid, $stsem)) + if ($pr->result) { - $pr_note = $lvnote->note; - $pr_punkte = $lvnote->punkte; - $benotungsdatum = $lvnote->benotungsdatum; + $termin1 = 1; } else { - $pr_note = 9; - $pr_punkte = ''; - $benotungsdatum = $jetzt; + $lvnote = new lvgesamtnote(); + if ($lvnote->load($lvid, $student_uid, $stsem)) + { + $pr_note = $lvnote->note; + $pr_punkte = $lvnote->punkte; + $benotungsdatum = $lvnote->benotungsdatum; + } + else + { + $pr_note = 9; + $pr_punkte = ''; + $benotungsdatum = $jetzt; + } + + $pr_1 = new Pruefung(); + $pr_1->lehreinheit_id = $lehreinheit_id; + $pr_1->student_uid = $student_uid; + $pr_1->mitarbeiter_uid = $user; + $pr_1->note = $pr_note; + $pr_1->punkte = $pr_punkte; + $pr_1->pruefungstyp_kurzbz = "Termin1"; + $pr_1->datum = $benotungsdatum; + $pr_1->anmerkung = ""; + $pr_1->insertamum = $jetzt; + $pr_1->insertvon = $user; + $pr_1->updateamum = null; + $pr_1->updatevon = null; + $pr_1->ext_id = null; + $pr_1->new = true; + $pr_1->save(); + $response = "neu T1"; } - $pr_1 = new Pruefung(); - $pr_1->lehreinheit_id = $lehreinheit_id; - $pr_1->student_uid = $student_uid; - $pr_1->mitarbeiter_uid = $user; - $pr_1->note = $pr_note; - $pr_1->punkte = $pr_punkte; - $pr_1->pruefungstyp_kurzbz = "Termin1"; - $pr_1->datum = $benotungsdatum; - $pr_1->anmerkung = ""; - $pr_1->insertamum = $jetzt; - $pr_1->insertvon = $user; - $pr_1->updateamum = null; - $pr_1->updatevon = null; - $pr_1->ext_id = null; - $pr_1->new = true; - $pr_1->save(); + $prTermin2 = new Pruefung(); + $pr_2 = new Pruefung(); + + // Die Pruefung wird als Termin2 eingetragen + if ($prTermin2->getPruefungen($student_uid, 'Termin2', $lvid, $stsem)) + { + if ($prTermin2->result) + { + $pr_2->load($prTermin2->result[0]->pruefung_id); + $pr_2->new = null; + $pr_2->updateamum = $jetzt; + $pr_2->updatevon = $user; + $old_note = $pr_2->note; + $pr_2->note = $note; + $pr_2->punkte = $punkte; + $pr_2->datum = $datum; + $pr_2->anmerkung = ""; + $response = "update T2"; + } + else + { + $pr_2->lehreinheit_id = $lehreinheit_id; + $pr_2->student_uid = $student_uid; + $pr_2->mitarbeiter_uid = $user; + $pr_2->note = $note; + $pr_2->punkte = $punkte; + $pr_2->pruefungstyp_kurzbz = $typ; + $pr_2->datum = $datum; + $pr_2->anmerkung = ""; + $pr_2->insertamum = $jetzt; + $pr_2->insertvon = $user; + $pr_2->updateamum = null; + $pr_2->updatevon = null; + $pr_2->ext_id = null; + $pr_2->new = true; + $old_note = -1; + $response = "new T2"; + } + $pr_2->save(); + } } } - - - $prTermin2 = new Pruefung(); - $pr_2 = new Pruefung(); - - // Die Pruefung wird als Termin2 eingetragen - if ($prTermin2->getPruefungen($student_uid, $typ, $lvid, $stsem)) + else { - if ($prTermin2->result) - { - $pr_2->load($prTermin2->result[0]->pruefung_id); - $pr_2->new = null; - $pr_2->updateamum = $jetzt; - $pr_2->updatevon = $user; - $old_note = $pr_2->note; - $pr_2->note = $note; - $pr_2->punkte = $punkte; - $pr_2->datum = $datum; - $pr_2->anmerkung = ""; - } - else - { - $pr_2->lehreinheit_id = $lehreinheit_id; - $pr_2->student_uid = $student_uid; - $pr_2->mitarbeiter_uid = $user; - $pr_2->note = $note; - $pr_2->punkte = $punkte; - $pr_2->pruefungstyp_kurzbz = $typ; - $pr_2->datum = $datum; - $pr_2->anmerkung = ""; - $pr_2->insertamum = $jetzt; - $pr_2->insertvon = $user; - $pr_2->updateamum = null; - $pr_2->updatevon = null; - $pr_2->ext_id = null; - $pr_2->new = true; - $old_note = -1; - } - $pr_2->save(); + $response = "no existing T3"; } - - // Wenn eine Pruefung eingetragen wird, wird danach die LV-Note korrigiert - $jetzt = date("Y-m-d H:i:s"); - - $lvid = $_REQUEST["lvid"]; + //Gesamtnote updaten $lvgesamtnote = new lvgesamtnote(); - if (!$lvgesamtnote->load($lvid, $student_uid, $stsem)) - { + if (!$lvgesamtnote->load($lvid, $student_uid, $stsem)) + { $lvgesamtnote->student_uid = $student_uid; $lvgesamtnote->lehrveranstaltung_id = $lvid; $lvgesamtnote->studiensemester_kurzbz = $stsem; @@ -272,9 +383,9 @@ if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') ) $lvgesamtnote->insertvon = $user; $new = true; $response = "neu"; - } - else - { + } + else + { $lvgesamtnote->note = $note; $lvgesamtnote->punkte = $punkte; $lvgesamtnote->benotungsdatum = $jetzt; @@ -286,12 +397,11 @@ if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') ) else $response = "update"; } + if (!$lvgesamtnote->save($new)) - echo "".$lvgesamtnote->errormsg.""; + return $lvgesamtnote->errormsg; else - echo $response; + return $response; } -else - echo "Fehler beim Eintragen der Prüfungen"; ?> From 035d196ae5cb45b44a4f2f863e7bf5fd0ddbe872 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 13 Oct 2022 08:04:10 +0200 Subject: [PATCH 003/221] Logik Matrikelnummer StudentenId --- .../benotungstool/nachpruefungeintragen.php | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/cis/private/lehre/benotungstool/nachpruefungeintragen.php b/cis/private/lehre/benotungstool/nachpruefungeintragen.php index 81545a7f6..d1a7e2326 100644 --- a/cis/private/lehre/benotungstool/nachpruefungeintragen.php +++ b/cis/private/lehre/benotungstool/nachpruefungeintragen.php @@ -99,6 +99,8 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) { $id=mb_substr($row, mb_strlen('student_uid_')); + $response2 = ''; + $student_uid = $_POST['student_uid_'.$id]; $note = null; $punkte = null; @@ -115,24 +117,21 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) $punkte=str_replace(',','.', $punkte); $datum = $_POST['datumNachp_'.$id]; + $datum_obj = new datum(); + $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); // //check ob Matrikelnummer anstelle der student_uid übergeben wurde - // - // - // $student = new student(); - // - // - // $response2 = true; - // if (!$student->checkIfValidStudentUID($student_uid)) - // { - // //UID ermitteln - // if(!$student_uid = $student->getUidFromMatrikelnummer($student_uid)) - // { - // $response2 = false; - // $response2.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($student_uid)); - // continue; - // } - // } + + $student = new student(); + if (!$student->checkIfValidStudentUID($student_uid)) + { + //UID ermitteln + if(!$student_uid = $student->getUidFromMatrikelnummer($student_uid)) + { + $response2.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($student_uid)); + continue; + } + } $lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem); @@ -146,7 +145,7 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) echo "\ndb " . " lvid ". $lvid . " note " . $note . " student_uid " . $student_uid . " datum " . $datum . " studiensem " . $stsem . " lehreinheit_id_pr " . $lehreinheit_id . " typ " . $typ . " response" . $response . "\n"; - // echo $response; + echo $response2; } else @@ -168,7 +167,6 @@ else $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); } - // echo "Variante Einzel"; else die('Fehlerhafte Parameteruebergabe'); From 29fc5181bf237ba65337de647f1180c4d9420b9d Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 13 Oct 2022 10:16:26 +0200 Subject: [PATCH 004/221] Importfunktion Termin3 --- .../benotungstool/lvgesamtnoteverwalten.php | 2 +- .../benotungstool/nachpruefungeintragen.php | 48 +++++++++++++++++-- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index 6a160c646..80bb7c5a5 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -1194,7 +1194,7 @@ if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN } if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) { - $htmlstring .= "
" . $p->t('benotungstool/nachpruefung') . "
+ $htmlstring .= "
" . $p->t('benotungstool/nachpruefung2') . "
"; } diff --git a/cis/private/lehre/benotungstool/nachpruefungeintragen.php b/cis/private/lehre/benotungstool/nachpruefungeintragen.php index d1a7e2326..e8553ce7b 100644 --- a/cis/private/lehre/benotungstool/nachpruefungeintragen.php +++ b/cis/private/lehre/benotungstool/nachpruefungeintragen.php @@ -120,8 +120,7 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) $datum_obj = new datum(); $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); - // //check ob Matrikelnummer anstelle der student_uid übergeben wurde - + //check ob Matrikelnummer anstelle der student_uid übergeben wurde $student = new student(); if (!$student->checkIfValidStudentUID($student_uid)) { @@ -138,9 +137,6 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) if(isset($_POST['student_uid_'.$id]) && (isset($_POST['note_'.$id]) || isset($_POST['punkte_'.$id])) && isset($_POST['datumNachp_'.$id])) { - // echo "\ndb " . " lvid ". $lvid . " note " . $note . " student_uid " . $student_uid . " datum " . $datum . " studiensem " . - // $stsem . " lehreinheit_id_pr " . $lehreinheit_id . " typ " . $typ . "\n"; - $response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte); echo "\ndb " . " lvid ". $lvid . " note " . $note . " student_uid " . $student_uid . " datum " . $datum . " studiensem " . @@ -356,6 +352,48 @@ function savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ } } } + elseif ($typ == "Termin3") + { + $prTermin3 = new Pruefung(); + $pr_3 = new Pruefung(); + + if ($prTermin3->getPruefungen($student_uid, 'Termin3', $lvid, $stsem)) + { + if ($prTermin3->result) + { + $pr_3->load($prTermin3->result[0]->pruefung_id); + $pr_3->new = null; + $pr_3->updateamum = $jetzt; + $pr_3->updatevon = $user; + $old_note = $pr_3->note; + $pr_3->note = $note; + $pr_3->punkte = $punkte; + $pr_3->datum = $datum; + $pr_3->anmerkung = ""; + $response = "Prüfung Termin3 aktualisiert"; + } + else + { + $pr_3->lehreinheit_id = $lehreinheit_id; + $pr_3->student_uid = $student_uid; + $pr_3->mitarbeiter_uid = $user; + $pr_3->note = $note; + $pr_3->punkte = $punkte; + $pr_3->pruefungstyp_kurzbz = $typ; + $pr_3->datum = $datum; + $pr_3->anmerkung = ""; + $pr_3->insertamum = $jetzt; + $pr_3->insertvon = $user; + $pr_3->updateamum = null; + $pr_3->updatevon = null; + $pr_3->ext_id = null; + $pr_3->new = true; + $old_note = -1; + $response = "neue Prüfung Termin3"; + } + $pr_3->save(); + } + } else { $response = "no existing T3"; From ce3cea5515721e933b621cf9f2902ddca5aecf21 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 13 Oct 2022 15:36:08 +0200 Subject: [PATCH 005/221] Validierungen Format Datum, Matrikelnr, StudentId, Note --- .../benotungstool/lvgesamtnoteverwalten.php | 61 +++++++++---------- .../benotungstool/nachpruefungeintragen.php | 51 +++++++--------- locale/de-AT/benotungstool.php | 4 +- locale/en-US/benotungstool.php | 1 + 4 files changed, 56 insertions(+), 61 deletions(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index 80bb7c5a5..8a428ff2a 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -20,33 +20,33 @@ * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > * Manuela Thamer */ -require_once ('../../../../config/cis.config.inc.php'); -require_once ('../../../../config/global.config.inc.php'); -require_once ('../../../../include/functions.inc.php'); -require_once ('../../../../include/lehrveranstaltung.class.php'); -require_once ('../../../../include/studiengang.class.php'); -require_once ('../../../../include/studiensemester.class.php'); -require_once ('../../../../include/lehreinheit.class.php'); -require_once ('../../../../include/benutzerberechtigung.class.php'); -require_once ('../../../../include/uebung.class.php'); -require_once ('../../../../include/beispiel.class.php'); -require_once ('../../../../include/studentnote.class.php'); -require_once ('../../../../include/datum.class.php'); -require_once ('../../../../include/legesamtnote.class.php'); -require_once ('../../../../include/lvgesamtnote.class.php'); -require_once ('../../../../include/zeugnisnote.class.php'); -require_once ('../../../../include/pruefung.class.php'); -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/phrasen.class.php'); -require_once ('../../../../include/note.class.php'); -require_once ('../../../../include/notenschluessel.class.php'); -require_once ('../../../../include/studienplan.class.php'); -require_once ('../../../../include/addon.class.php'); -require_once ('../../../../include/mobilitaet.class.php'); -require_once ('../../../../include/student.class.php'); +require_once('../../../../config/cis.config.inc.php'); +require_once('../../../../config/global.config.inc.php'); +require_once('../../../../include/functions.inc.php'); +require_once('../../../../include/lehrveranstaltung.class.php'); +require_once('../../../../include/studiengang.class.php'); +require_once('../../../../include/studiensemester.class.php'); +require_once('../../../../include/lehreinheit.class.php'); +require_once('../../../../include/benutzerberechtigung.class.php'); +require_once('../../../../include/uebung.class.php'); +require_once('../../../../include/beispiel.class.php'); +require_once('../../../../include/studentnote.class.php'); +require_once('../../../../include/datum.class.php'); +require_once('../../../../include/legesamtnote.class.php'); +require_once('../../../../include/lvgesamtnote.class.php'); +require_once('../../../../include/zeugnisnote.class.php'); +require_once('../../../../include/pruefung.class.php'); +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/phrasen.class.php'); +require_once('../../../../include/note.class.php'); +require_once('../../../../include/notenschluessel.class.php'); +require_once('../../../../include/studienplan.class.php'); +require_once('../../../../include/addon.class.php'); +require_once('../../../../include/mobilitaet.class.php'); +require_once('../../../../include/student.class.php'); $summe_stud = 0; $summe_t2 = 0; @@ -190,7 +190,7 @@ foreach ($noten_obj->result as $row) $noten_array[$row->note]['lehre'] = $row->lehre; $noten_array[$row->note]['lkt_ueberschreibbar'] = $row->lkt_ueberschreibbar; $noten_array[$row->note]['anmerkung'] = $row->anmerkung; - foreach ($sprachen->result AS $s) + foreach ($sprachen->result as $s) $noten_array[$row->note]['bezeichnung_mehrsprachig'][$s->sprache] = $row->bezeichnung_mehrsprachig[$s->sprache]; } @@ -376,7 +376,7 @@ foreach ($noten_obj->result as $row) var datum_test = datum.split("."); if (datum_test[0].length != 2 || datum_test[1].length != 2 || datum_test[2].length!=4 || isNaN(datum_test[2]) || datum_test[1]>12 || datum_test[1]<1 || datum_test[0]>31 || datum_test[0]<1) - alert("Invalid Date Format: DD.MM.YYYY"); + alert("Das Datum entspricht nicht dem Format TT.MM.JJJJ!"); else { var anlegendiv = document.getElementById("nachpruefung_div"); @@ -939,7 +939,6 @@ if (defined('CIS_ANWESENHEITSLISTE_NOTENLISTE_ANZEIGEN') && CIS_ANWESENHEITSLIST { $hrefpath = "../notenliste.xls.php?stg=$stg_obj->studiengang_kz&lvid=$lvid&stsem=$stsem"; echo "
" . $p->t('benotungstool/notenlisteImport') . ""; - } // eingetragene lv-gesamtnoten freigeben @@ -1333,7 +1332,6 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG foreach ($grades as $uid => $data) //Ausgabe Array { - $htmlstring .= ' ' . $db->convert_html_chars($uid) . ' @@ -1465,7 +1463,6 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG // Punkte if (CIS_GESAMTNOTE_PUNKTE) { - $htmlstring .= ' $val) + $errorMatrnr = ''; + $errorDatum = ''; + foreach ($_POST as $row => $val) { if(mb_strstr(mb_strtolower($row), 'student_uid_')) { $id=mb_substr($row, mb_strlen('student_uid_')); - $response2 = ''; - $student_uid = $_POST['student_uid_'.$id]; $note = null; $punkte = null; @@ -114,35 +114,36 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) $response.="\nNote oder Punkte fehlen"; continue; } - $punkte=str_replace(',','.', $punkte); + $punkte=str_replace(',', '.', $punkte); $datum = $_POST['datumNachp_'.$id]; + //check Datumsformat + $checkedDatum = $datum; $datum_obj = new datum(); - $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); + if(!$datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true)) + { + $errorDatum .="\n".$p->t('benotungstool/datumsformatUnzulaessig', array($checkedDatum)); + continue; + } //check ob Matrikelnummer anstelle der student_uid übergeben wurde $student = new student(); if (!$student->checkIfValidStudentUID($student_uid)) { + $checkedMatrnr = $student_uid; //UID ermitteln if(!$student_uid = $student->getUidFromMatrikelnummer($student_uid)) { - $response2.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($student_uid)); + $errorMatrnr.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht', array($checkedMatrnr)); continue; } } - $lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem); if(isset($_POST['student_uid_'.$id]) && (isset($_POST['note_'.$id]) || isset($_POST['punkte_'.$id])) && isset($_POST['datumNachp_'.$id])) { $response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte); - - echo "\ndb " . " lvid ". $lvid . " note " . $note . " student_uid " . $student_uid . " datum " . $datum . " studiensem " . - $stsem . " lehreinheit_id_pr " . $lehreinheit_id . " typ " . $typ . " response" . $response . "\n"; - echo $response2; - } else { @@ -150,22 +151,18 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) } } } - + echo $errorMatrnr . $errorDatum; } else { // Einzelupdate - if(isset($_GET['datum']) ) + if(isset($_GET['datum'])) { $datum = $_GET['datum']; $datum_obj = new datum(); - $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); + $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) or die($p->t('benotungstool/datumsformatUnzulaessig', array($checkedDatum))); } - - else - die('Fehlerhafte Parameteruebergabe'); - $student_uid = $_REQUEST["student_uid"]; $note = $_REQUEST["note"]; @@ -174,7 +171,7 @@ else else $punkte = ''; - $punkte = str_replace(',','.',$punkte); + $punkte = str_replace(',', '.', $punkte); if($punkte!='') { @@ -205,11 +202,10 @@ else $uid = (isset($_GET['uid'])?$_GET['uid']:''); // lvgesamtnote für studenten speichern - if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') ) + if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '')) { // Die Pruefung muss einer Lehreinheit zugeordnet werden // deshalb wird hier versucht eine passende Lehreinheit zu ermitteln. - $lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem); $response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note); @@ -217,7 +213,6 @@ else } else echo "Fehler beim Eintragen der Prüfungen"; - } /** @@ -259,7 +254,7 @@ function getLehreinheit($db, $lvid, $student_uid, $stsem) /** * Prüfung speichern */ -function savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte=null) +function savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte = null) { $jetzt = date("Y-m-d H:i:s"); global $user; //, $note, $punkte, $datum; @@ -370,7 +365,7 @@ function savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ $pr_3->punkte = $punkte; $pr_3->datum = $datum; $pr_3->anmerkung = ""; - $response = "Prüfung Termin3 aktualisiert"; + $response = "update T3"; } else { @@ -389,14 +384,14 @@ function savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ $pr_3->ext_id = null; $pr_3->new = true; $old_note = -1; - $response = "neue Prüfung Termin3"; + $response = "new T3"; } $pr_3->save(); } } else { - $response = "no existing T3"; + $response = "fehlende oder fehlerhafte Inputparameter"; } //Gesamtnote updaten diff --git a/locale/de-AT/benotungstool.php b/locale/de-AT/benotungstool.php index a38aa31f3..b7c2af638 100644 --- a/locale/de-AT/benotungstool.php +++ b/locale/de-AT/benotungstool.php @@ -148,7 +148,9 @@ $this->phrasen['benotungstool/anzahlKommisionellePruefungen']='Anzahl kommission $this->phrasen['benotungstool/pruefungAnlegenFuer']='Prüfung anlegen für'; $this->phrasen['benotungstool/kreuzerltool']='Kreuzerltool'; $this->phrasen['benotungstool/studentIstLvNichtZugeordnet']='Der Student %s %s (%s) ist dieser Lehrveranstaltung nicht zugeordnet. Die Note wird nicht uebernommen!'; -$this->phrasen['benotungstool/studentMitMatrikelnummerExistiertNicht']='Student mit Matrikelnummer %s existiert nicht.'; +$this->phrasen['benotungstool/studentMitMatrikelnummerExistiertNicht']='Student*in mit Matrikelnummer %s existiert nicht.'; +$this->phrasen['benotungstool/datumsformatUnzulaessig']='Das Datum %s entspricht nicht dem Format TT.MM.JJJJ!'; +$this->phrasen['benotungstool/noteUnzulaessig']='Die Note %s ist nicht zulaessig. Die Zeile wurde uebersprungen.'; $this->phrasen['benotungstool/noteNichtUeberschreibbar']='Für Student mit Matrikelnummer %s eingetragene Zeugnisote %s ist nicht überschreibbar'; $this->phrasen['benotungstool/fehlerhafteNoteBeiStudent']='Fehlerhafte Note bei Student %s %s'; $this->phrasen['benotungstool/keineKreuzerllistenFuerDieseLehrveranstaltung']='Derzeit gibt es keine Kreuzerllisten für diese Lehrveranstaltung'; diff --git a/locale/en-US/benotungstool.php b/locale/en-US/benotungstool.php index 72f29256e..1f1dc89c6 100644 --- a/locale/en-US/benotungstool.php +++ b/locale/en-US/benotungstool.php @@ -148,6 +148,7 @@ $this->phrasen['benotungstool/pruefungAnlegenFuer']='Create an examination for ' $this->phrasen['benotungstool/kreuzerltool']='"Kreuzerl" tool'; $this->phrasen['benotungstool/studentIstLvNichtZugeordnet']='Student is not assigned to this course. The grade was not accepted!'; $this->phrasen['benotungstool/studentMitMatrikelnummerExistiertNicht']='Student with student ID number %s does not exist.'; +$this->phrasen['benotungstool/datumsformatUnzulaessig']='The date %s is not in valid format TT.MM.JJJJ.'; $this->phrasen['benotungstool/noteNichtUeberschreibbar']='Transcript grade %2$s for student with Personal identifier %1$s is not rewritable'; $this->phrasen['benotungstool/fehlerhafteNoteBeiStudent']='Incorrect grade for student %s %s'; $this->phrasen['benotungstool/keineKreuzerllistenFuerDieseLehrveranstaltung']='There are currently no checklists for this course'; From 8754c46575f53bccffdcb1ec2dd6d51923fd0b48 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 17 Oct 2022 14:34:11 +0200 Subject: [PATCH 006/221] Refactor Import Termin2 und Termin3 --- .../benotungstool/lvgesamtnoteverwalten.php | 27 ++++--------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index 8a428ff2a..b7bb74d54 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -606,7 +606,7 @@ foreach ($noten_obj->result as $row) // **** // * Oeffnet ein Fenster fuer den Import von Noten für die Nachprüfung aus dem Excel // **** - function GradeImportNachp() + function GradeImportNachp(termin) { var str = "
"; str += ""; @@ -614,31 +614,14 @@ foreach ($noten_obj->result as $row) var y = getOffset('y'); y = y+50; anlegendiv.style.top = y+"px"; str += ''; str += ''; - str += "
X
t('benotungstool/importAnweisungNachp');?>:
' onclick='saveGradeBulkNachp(\"Termin2\");'>"; + + str += "
' onclick='saveGradeBulkNachp(\""+ termin +"\");'>"; str += "
"; anlegendiv.innerHTML = str; anlegendiv.style.visibility = "visible"; $('#noteimporttextareaNachp').focus(); } - // **** - // * Oeffnet ein Fenster fuer den Import von Noten für Termin3 aus dem Excel - // **** - function GradeImportTermin3() - { - var str = "
"; - str += ""; - var anlegendiv = document.getElementById("nachpruefung_div"); - var y = getOffset('y'); y = y+50; anlegendiv.style.top = y+"px"; - str += ''; - str += ''; - str += "
X
t('benotungstool/importAnweisungNachp');?>:
' onclick='saveGradeBulkNachp(\"Termin3\");'>"; - str += "
"; - anlegendiv.innerHTML = str; - anlegendiv.style.visibility = "visible"; - $('#noteimporttextareaTermin3').focus(); - } - // Speichert die Noten ueber den Import function saveGradeBulk() { @@ -1188,13 +1171,13 @@ $htmlstring .= "" . $p->t('benotungstool/punkte') . ' / ' . $p->t('benotungs if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2) { $htmlstring .= "
" . $p->t('benotungstool/nachpruefung') . "
- + "; } if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) { $htmlstring .= "
" . $p->t('benotungstool/nachpruefung2') . "
- + "; } if (defined('CIS_GESAMTNOTE_PRUEFUNG_KOMMPRUEF') && CIS_GESAMTNOTE_PRUEFUNG_KOMMPRUEF) From 47d3ab33e78d0fbb68f5e484494a518c7e35033c Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 18 Oct 2022 09:17:07 +0200 Subject: [PATCH 007/221] =?UTF-8?q?Adaptierung=20Vorlage=20Notenliste.xls?= =?UTF-8?q?=20um=20Nachpr=C3=BCfung=20und=20Termin3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../benotungstool/lvgesamtnoteeintragen.php | 21 +++--- .../benotungstool/lvgesamtnoteverwalten.php | 4 +- .../benotungstool/nachpruefungeintragen.php | 1 + cis/private/lehre/notenliste.xls.php | 67 +++++++++++++++++++ locale/de-AT/benotungstool.php | 4 +- locale/en-US/benotungstool.php | 2 +- 6 files changed, 84 insertions(+), 15 deletions(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteeintragen.php b/cis/private/lehre/benotungstool/lvgesamtnoteeintragen.php index 73d0e6fca..8337b7c36 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteeintragen.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteeintragen.php @@ -98,9 +98,9 @@ if($stsem=='') //$note = $_REQUEST["note"]; -if(!$rechte->isBerechtigt('admin',0) && - !$rechte->isBerechtigt('admin',$lv_obj->studiengang_kz) && - !$rechte->isBerechtigt('lehre',$lv_obj->studiengang_kz)) +if(!$rechte->isBerechtigt('admin', 0) && + !$rechte->isBerechtigt('admin', $lv_obj->studiengang_kz) && + !$rechte->isBerechtigt('lehre', $lv_obj->studiengang_kz)) { $qry = "SELECT lehreinheit_id FROM lehre.tbl_lehrveranstaltung JOIN lehre.tbl_lehreinheit USING(lehrveranstaltung_id) JOIN lehre.tbl_lehreinheitmitarbeiter USING(lehreinheit_id) @@ -117,11 +117,11 @@ if(!$rechte->isBerechtigt('admin',0) && } } -function savenote($db,$lvid, $student_uid, $note, $punkte=null) +function savenote($db, $lvid, $student_uid, $note, $punkte = null) { global $stsem, $user, $p, $noten_anmerkung; $jetzt = date("Y-m-d H:i:s"); - $punkte = str_replace(',','.',$punkte); + $punkte = str_replace(',', '.', $punkte); //Ermitteln ob der Student diesem Kurs zugeteilt ist $qry = "SELECT 1 FROM campus.vw_student_lehrveranstaltung WHERE uid=".$db->db_add_param($student_uid)." AND lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER); if($result = $db->db_query($qry)) @@ -207,13 +207,12 @@ if (isset($_REQUEST["submit"])) $note = $_REQUEST["note"]; $punkte = (isset($_REQUEST["punkte"])?$_REQUEST["punkte"]:''); - $response = savenote($db,$lvid, $student_uid, $note, $punkte); + $response = savenote($db, $lvid, $student_uid, $note, $punkte); echo $response; } else { - - foreach ($_POST as $row=>$val) + foreach ($_POST as $row => $val) { if(mb_strstr(mb_strtolower($row), 'matrikelnr_')) { @@ -232,7 +231,7 @@ if (isset($_REQUEST["submit"])) $response.="\nNote oder Punkte fehlen"; continue; } - $punkte=str_replace(',','.', $punkte); + $punkte=str_replace(',', '.', $punkte); //check ob statt Matrikelnummer nicht bereits student_uid (Moodle Grade Import) vorliegt.. $student = new student(); @@ -241,7 +240,7 @@ if (isset($_REQUEST["submit"])) //UID ermitteln if(!$student_uid = $student->getUidFromMatrikelnummer($matrikelnummer)) { - $response.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($matrikelnummer)); + $response.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht', array($matrikelnummer)); continue; } } @@ -268,7 +267,7 @@ if (isset($_REQUEST["submit"])) } } - $val=savenote($db,$lvid, $student_uid, $note, $punkte); + $val=savenote($db, $lvid, $student_uid, $note, $punkte); if($val!='neu' && $val!='update' && $val!='update_f') $response.=$val; } diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index b7bb74d54..64179a3e9 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -749,6 +749,7 @@ foreach ($noten_obj->result as $row) } ?> + for(row in rows) { zeile = rows[row].split(" "); @@ -779,6 +780,7 @@ foreach ($noten_obj->result as $row) } } + if (alertMsg != "") alert(alertMsg); @@ -1306,7 +1308,7 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG foreach ($addon_obj->result as $row) { if (file_exists('../../../../addons/' . $row->kurzbz . '/cis/grades.inc.php')) - include ('../../../../addons/' . $row->kurzbz . '/cis/grades.inc.php'); + include('../../../../addons/' . $row->kurzbz . '/cis/grades.inc.php'); } } } diff --git a/cis/private/lehre/benotungstool/nachpruefungeintragen.php b/cis/private/lehre/benotungstool/nachpruefungeintragen.php index 307c0ca30..290113179 100644 --- a/cis/private/lehre/benotungstool/nachpruefungeintragen.php +++ b/cis/private/lehre/benotungstool/nachpruefungeintragen.php @@ -105,6 +105,7 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) $note = null; $punkte = null; $datum = null; + $response = ''; if(isset($_POST['note_'.$id])) $note = $_POST['note_'.$id]; elseif(isset($_POST['punkte_'.$id])) diff --git a/cis/private/lehre/notenliste.xls.php b/cis/private/lehre/notenliste.xls.php index 74cb7e7c1..4a6817a36 100644 --- a/cis/private/lehre/notenliste.xls.php +++ b/cis/private/lehre/notenliste.xls.php @@ -35,6 +35,7 @@ require_once('../../../include/note.class.php'); require_once('../../../include/notenschluessel.class.php'); require_once('../../../include/Excel/excel.php'); require_once('../../../include/phrasen.class.php'); +require_once('../../../include/pruefung.class.php'); $uid = get_uid(); @@ -191,6 +192,19 @@ else } //Studenten holen + + //Spaltengruppe für Nachprüfung + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2) + { + $worksheet->write($lines,8,$p->t('benotungstool/nachpruefung'),$format_bold); + } + + //Spaltengruppe für 2.Nebensprüfungstermin + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) + { + $worksheet->write($lines,12,$p->t('benotungstool/nachpruefung2'),$format_bold); + } + $lines++; $worksheet->write($lines,1,$p->t('global/uid'),$format_border_bottom); $worksheet->write($lines,2,$p->t('global/nachname'),$format_border_bottom); @@ -203,6 +217,26 @@ else else $worksheet->write($lines,6,$p->t('benotungstool/note'),$format_border_bottom); + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2) + { + $worksheet->write($lines,8,$p->t('global/uid'),$format_border_bottom); + $worksheet->write($lines,9,$p->t('global/datum'),$format_border_bottom); + if(defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE) + $worksheet->write($lines,10,$p->t('benotungstool/punkte'),$format_border_bottom); + else + $worksheet->write($lines,10,$p->t('benotungstool/note'),$format_border_bottom); + } + + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) +{ + $worksheet->write($lines,12,$p->t('global/uid'),$format_border_bottom); + $worksheet->write($lines,13,$p->t('global/uid'),$format_border_bottom); + if(defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE) + $worksheet->write($lines,14,$p->t('benotungstool/punkte'),$format_border_bottom); + else + $worksheet->write($lines,14,$p->t('benotungstool/note'),$format_border_bottom); +} + $stsem_obj = new studiensemester(); $stsem_obj->load($stsem); $stsemdatumvon = $stsem_obj->start; @@ -282,6 +316,39 @@ else $worksheet->write($lines,4,'="'.$elem->semester.$elem->verband.$elem->gruppe.'"'); $worksheet->write($lines,5,'="'.trim($elem->matrikelnr).'"',$format_highlight); $worksheet->write($lines,6, $note, $format_highlightright); + + // Nachprüfung + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2) + { + $worksheet->write($lines,8, $elem->uid, $format_highlightright); + $pr = new Pruefung(); + $pr->getPruefungen($elem->uid, "Termin2", $lvid, $sem); + $output2 = $pr->result; + + if ($output2) + { + $resultPr = $output2[0]; + $worksheet->write($lines,9, date('d.m.Y', strtotime($resultPr->datum)), $format_highlightright); + $worksheet->write($lines,10, $resultPr->note, $format_highlightright); + } + } + + // Nachprüfung + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) + { + $worksheet->write($lines,12, $elem->uid, $format_highlightright); + $pr = new Pruefung(); + $pr->getPruefungen($elem->uid, "Termin3", $lvid, $sem); + $output3 = $pr->result; + + if ($output3) + { + $resultPr = $output3[0]; + $worksheet->write($lines,13, date('d.m.Y', strtotime($resultPr->datum)), $format_highlightright); + $worksheet->write($lines,14, $resultPr->note, $format_highlightright); + } + } + $i++; $lines++; } diff --git a/locale/de-AT/benotungstool.php b/locale/de-AT/benotungstool.php index b7c2af638..feac092f6 100644 --- a/locale/de-AT/benotungstool.php +++ b/locale/de-AT/benotungstool.php @@ -172,8 +172,8 @@ $this->phrasen['benotungstool/eingetrageneNoten']='Eingetragene Noten'; $this->phrasen['benotungstool/zeunis']='Zeugnis'; $this->phrasen['benotungstool/handbuch']='Handbuch'; $this->phrasen['benotungstool/punkte']='Punkte'; -$this->phrasen['benotungstool/importAnweisung']='Kopieren Sie die Spalten Personenkennzeichen und Note aus der Notenliste (bzw. StudentenUid und Note aus dem MoodleExport) und fügen Sie diese in folgendes Feld ein'; -$this->phrasen['benotungstool/importAnweisungNachp']='Kopieren Sie die Spalten Personenkennzeichen, Datum und Note aus der Notenliste (bzw. StudentenUid, Datum und Note aus dem MoodleExport) und fügen Sie diese in folgendes Feld ein'; +$this->phrasen['benotungstool/importAnweisung']='Kopieren Sie die Spalten StudentenUid und Note aus der Notenliste (bzw. StudentenUid und Note aus dem MoodleExport) und fügen Sie diese in folgendes Feld ein'; +$this->phrasen['benotungstool/importAnweisungNachp']='Kopieren Sie die Spalten StudentenUid (bzw. Personenkennzeichen), Datum und Note aus der Notenliste bzw. dem Moodle Export File und fügen Sie diese in folgendes Feld ein'; $this->phrasen['benotungstool/pruefung']='Prüfung'; $this->phrasen['benotungstool/notenlisteImport']='Notenliste für den LV-Noten-Import (Excel)'; $this->phrasen['benotungstool/bearbeitetvon']='Bearbeitet von'; diff --git a/locale/en-US/benotungstool.php b/locale/en-US/benotungstool.php index 1f1dc89c6..f482409d8 100644 --- a/locale/en-US/benotungstool.php +++ b/locale/en-US/benotungstool.php @@ -171,7 +171,7 @@ $this->phrasen['benotungstool/zeunis']='Transcript'; $this->phrasen['benotungstool/handbuch']='Handbook'; $this->phrasen['benotungstool/punkte']='Points'; $this->phrasen['benotungstool/importAnweisung']='Copy the columns "personal identifier" and "grade" from the grade list (or "student ID number" and "grade" from the moodle export file) and insert them in the following field'; -$this->phrasen['benotungstool/importAnweisungNachp']='Copy the columns "personal identifier", "date" and "grade" from the grade list (or "student ID number", "date" and "grade" from the moodle export file) and insert them in the following field'; +$this->phrasen['benotungstool/importAnweisungNachp']='Copy the columns "student ID number" (or "personal identifier"), "date" and "grade" from the grade list or from the moodle export file and insert them in the following field'; $this->phrasen['benotungstool/pruefung']='Examination'; $this->phrasen['benotungstool/notenlisteImport']='Grade list for the subject grade import (Excel)'; $this->phrasen['benotungstool/geaenderteNotenVorhanden']='There are changed grades. Please send the changes to the assistant by clicking "Approval"'; From 9c0d70fe890d234aa2b44086fcfec4be0074a714 Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 8 Nov 2022 12:01:05 +0100 Subject: [PATCH 008/221] Removed version 4 of tinymce --- composer.json | 12 -- composer.lock | 424 +++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 386 insertions(+), 50 deletions(-) diff --git a/composer.json b/composer.json index 825ed5625..46f4edc39 100644 --- a/composer.json +++ b/composer.json @@ -270,17 +270,6 @@ } } }, - { - "type": "package", - "package": { - "name": "tinymce/tinymce4", - "version": "4.9.11", - "dist": { - "url": "https://github.com/tinymce/tinymce-dist/archive/refs/tags/4.9.11.zip", - "type": "zip" - } - } - }, { "type": "package", "package": { @@ -413,7 +402,6 @@ "scottjehl/respond": "1.4.2", "tapmodo/jcrop": "2.0.4", - "tinymce/tinymce4": "4.9.*", "tinymce/tinymce5": "5.10.*", "tomazdragar/simplecropper": "1.0", "twbs/bootstrap3": "3.4.*", diff --git a/composer.lock b/composer.lock index 72f13c76f..ce909eccc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d530cc4d7bd81812535eb64e87ba04f4", + "content-hash": "269157583af475d4c8cd307400c7b248", "packages": [ { "name": "afarkas/html5shiv", @@ -35,6 +35,10 @@ ], "description": "Defacto way to enable use of HTML5 sectioning elements in legacy Internet Explorer.", "homepage": "http://paulirish.com/2011/the-history-of-the-html5-shiv/", + "support": { + "issues": "https://github.com/aFarkas/html5shiv/issues", + "source": "https://github.com/aFarkas/html5shiv/tree/3.7.3" + }, "time": "2015-07-20T20:04:00+00:00" }, { @@ -130,6 +134,16 @@ "keywords": [ "qr code" ], + "support": { + "issues": "https://github.com/chillerlan/php-qrcode/issues", + "source": "https://github.com/chillerlan/php-qrcode/tree/v2.0.x" + }, + "funding": [ + { + "url": "https://ko-fi.com/codemasher", + "type": "ko_fi" + } + ], "time": "2020-04-12T07:38:35+00:00" }, { @@ -178,6 +192,10 @@ "helper", "trait" ], + "support": { + "issues": "https://github.com/chillerlan/php-traits/issues", + "source": "https://github.com/chillerlan/php-traits" + }, "abandoned": true, "time": "2018-06-22T00:30:47+00:00" }, @@ -218,6 +236,10 @@ ], "description": "REST Server for the CodeIgniter framework", "homepage": "https://github.com/chriskacerguis/codeigniter-restserver", + "support": { + "issues": "https://github.com/chriskacerguis/codeigniter-restserver/issues", + "source": "https://github.com/chriskacerguis/codeigniter-restserver" + }, "time": "2017-09-23T16:44:55+00:00" }, { @@ -236,6 +258,10 @@ }, "type": "library", "notification-url": "https://packagist.org/downloads/", + "support": { + "issues": "https://github.com/akiyatkin/tablesorter/issues", + "source": "https://github.com/akiyatkin/tablesorter/tree/master" + }, "time": "2016-09-02T11:31:54+00:00" }, { @@ -269,6 +295,13 @@ ], "description": "The CodeIgniter framework", "homepage": "https://codeigniter.com", + "support": { + "forum": "http://forum.codeigniter.com/", + "issues": "https://github.com/bcit-ci/CodeIgniter/issues", + "slack": "https://codeigniterchat.slack.com", + "source": "https://github.com/bcit-ci/CodeIgniter", + "wiki": "https://github.com/bcit-ci/CodeIgniter/wiki" + }, "time": "2022-03-03T13:21:49+00:00" }, { @@ -573,6 +606,10 @@ ], "description": "Shim repository for Angular.js", "homepage": "http://angularjs.org", + "support": { + "issues": "https://github.com/components/angular.js/issues", + "source": "https://github.com/components/angular.js/tree/master" + }, "time": "2015-06-07T20:10:38+00:00" }, { @@ -615,6 +652,13 @@ ], "description": "jQuery JavaScript Library", "homepage": "http://jquery.com", + "support": { + "forum": "http://forum.jquery.com", + "irc": "irc://irc.freenode.org/jquery", + "issues": "https://github.com/jquery/jquery/issues", + "source": "https://github.com/jquery/jquery", + "wiki": "http://docs.jquery.com/" + }, "time": "2021-03-20T19:13:42+00:00" }, { @@ -700,6 +744,10 @@ } ], "description": "jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.", + "support": { + "issues": "https://github.com/components/jqueryui/issues", + "source": "https://github.com/components/jqueryui/tree/master" + }, "time": "2016-09-16T05:47:55+00:00" }, { @@ -749,6 +797,10 @@ "captcha", "security" ], + "support": { + "issues": "https://github.com/dapphp/securimage/issues", + "source": "https://github.com/dapphp/securimage/tree/master" + }, "abandoned": true, "time": "2018-03-09T06:07:41+00:00" }, @@ -812,6 +864,12 @@ "rdfa", "sparql" ], + "support": { + "forum": "http://groups.google.com/group/easyrdf/", + "irc": "irc://chat.freenode.net/easyrdf", + "issues": "http://github.com/njh/easyrdf/issues", + "source": "https://github.com/easyrdf/easyrdf/tree/0.9.1" + }, "time": "2015-02-27T09:45:49+00:00" }, { @@ -890,6 +948,10 @@ "faker", "fixtures" ], + "support": { + "issues": "https://github.com/fzaninotto/Faker/issues", + "source": "https://github.com/fzaninotto/Faker/tree/v1.9.2" + }, "abandoned": true, "time": "2020-12-11T09:56:16+00:00" }, @@ -1012,6 +1074,10 @@ "json", "schema" ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/master" + }, "time": "2014-08-25T02:48:14+00:00" }, { @@ -1046,6 +1112,10 @@ } ], "description": "A framework-agnostic PHP Implementation for generating simple forms based on json-schema", + "support": { + "issues": "https://github.com/kingsquare/json-schema-form/issues", + "source": "https://github.com/kingsquare/json-schema-form/tree/master" + }, "time": "2014-07-10T12:27:19+00:00" }, { @@ -1106,6 +1176,10 @@ "keywords": [ "markdown" ], + "support": { + "issues": "https://github.com/michelf/php-markdown/issues", + "source": "https://github.com/michelf/php-markdown/tree/lib" + }, "time": "2015-03-01T12:03:08+00:00" }, { @@ -1153,20 +1227,24 @@ "uri", "url" ], + "support": { + "issues": "https://github.com/lanthaler/IRI/issues", + "source": "https://github.com/lanthaler/IRI/tree/master" + }, "time": "2014-01-21T13:43:39+00:00" }, { "name": "ml/json-ld", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/lanthaler/JsonLD.git", - "reference": "c74a1aed5979ed1cfb1be35a55a305fd30e30b93" + "reference": "537e68e87a6bce23e57c575cd5dcac1f67ce25d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lanthaler/JsonLD/zipball/c74a1aed5979ed1cfb1be35a55a305fd30e30b93", - "reference": "c74a1aed5979ed1cfb1be35a55a305fd30e30b93", + "url": "https://api.github.com/repos/lanthaler/JsonLD/zipball/537e68e87a6bce23e57c575cd5dcac1f67ce25d8", + "reference": "537e68e87a6bce23e57c575cd5dcac1f67ce25d8", "shasum": "" }, "require": { @@ -1202,7 +1280,11 @@ "JSON-LD", "jsonld" ], - "time": "2020-06-16T17:45:06+00:00" + "support": { + "issues": "https://github.com/lanthaler/JsonLD/issues", + "source": "https://github.com/lanthaler/JsonLD/tree/1.2.1" + }, + "time": "2022-09-29T08:45:17+00:00" }, { "name": "moment/momentjs", @@ -1262,6 +1344,14 @@ "sorting", "table" ], + "support": { + "docs": "https://mottie.github.io/tablesorter/docs/index.html", + "email": "wowmotty@gmail.com", + "irc": "irc://irc.freenode.org/tablesorter", + "issues": "https://github.com/Mottie/tablesorter/issues", + "source": "https://github.com/Mottie/tablesorter", + "wiki": "https://github.com/Mottie/tablesorter/wiki" + }, "time": "2020-03-03T13:46:03+00:00" }, { @@ -1312,6 +1402,10 @@ "rest", "restful" ], + "support": { + "issues": "https://github.com/nategood/httpful/issues", + "source": "https://github.com/nategood/httpful/tree/v0.2.20" + }, "time": "2015-10-26T16:11:30+00:00" }, { @@ -1365,6 +1459,12 @@ "plaintext", "textile" ], + "support": { + "irc": "irc://irc.freenode.net/textile", + "issues": "https://github.com/textile/php-textile/issues", + "source": "https://github.com/textile/php-textile", + "wiki": "https://github.com/textile/php-textile/wiki" + }, "time": "2022-05-01T17:05:16+00:00" }, { @@ -1420,16 +1520,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "2.0.37", + "version": "2.0.39", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "c812fbb4d6b4d7f30235ab7298a12f09ba13b37c" + "reference": "f3a0e2b715c40cf1fd270d444901b63311725d63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c812fbb4d6b4d7f30235ab7298a12f09ba13b37c", - "reference": "c812fbb4d6b4d7f30235ab7298a12f09ba13b37c", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/f3a0e2b715c40cf1fd270d444901b63311725d63", + "reference": "f3a0e2b715c40cf1fd270d444901b63311725d63", "shasum": "" }, "require": { @@ -1444,7 +1544,8 @@ "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", - "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations.", + "ext-xml": "Install the XML extension to load XML formatted public keys." }, "type": "library", "autoload": { @@ -1507,7 +1608,25 @@ "x.509", "x509" ], - "time": "2022-04-04T04:57:45+00:00" + "support": { + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/2.0.39" + }, + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "time": "2022-10-24T10:49:03+00:00" }, { "name": "rmariuzzo/jquery-checkboxes", @@ -1587,6 +1706,23 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.19.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-10-23T09:01:57+00:00" }, { @@ -1598,15 +1734,6 @@ }, "type": "library" }, - { - "name": "tinymce/tinymce4", - "version": "4.9.11", - "dist": { - "type": "zip", - "url": "https://github.com/tinymce/tinymce-dist/archive/refs/tags/4.9.11.zip" - }, - "type": "library" - }, { "name": "tinymce/tinymce5", "version": "5.10.3", @@ -1706,6 +1833,10 @@ "keywords": [ "templating" ], + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/1.x" + }, "time": "2020-02-11T05:59:23+00:00" }, { @@ -1779,6 +1910,24 @@ "regex", "regular expression" ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/1.0.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], "time": "2022-01-21T20:24:37+00:00" }, { @@ -1826,20 +1975,39 @@ "Xdebug", "performance" ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], "time": "2022-02-24T20:20:32+00:00" }, { "name": "nikic/php-parser", - "version": "v4.14.0", + "version": "v4.15.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", "shasum": "" }, "require": { @@ -1878,20 +2046,24 @@ "parser", "php" ], - "time": "2022-05-31T20:59:12+00:00" + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" + }, + "time": "2022-09-04T07:30:47+00:00" }, { "name": "pdepend/pdepend", - "version": "2.10.3", + "version": "2.12.1", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "da3166a06b4a89915920a42444f707122a1584c9" + "reference": "7a892d56ceafd804b4a2ecc85184640937ce9e84" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/da3166a06b4a89915920a42444f707122a1584c9", - "reference": "da3166a06b4a89915920a42444f707122a1584c9", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/7a892d56ceafd804b4a2ecc85184640937ce9e84", + "reference": "7a892d56ceafd804b4a2ecc85184640937ce9e84", "shasum": "" }, "require": { @@ -1925,26 +2097,36 @@ "BSD-3-Clause" ], "description": "Official version of pdepend to be handled with Composer", - "time": "2022-02-23T07:53:09+00:00" + "support": { + "issues": "https://github.com/pdepend/pdepend/issues", + "source": "https://github.com/pdepend/pdepend/tree/2.12.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/pdepend/pdepend", + "type": "tidelift" + } + ], + "time": "2022-09-08T19:30:37+00:00" }, { "name": "phpmd/phpmd", - "version": "2.12.0", + "version": "2.13.0", "source": { "type": "git", "url": "https://github.com/phpmd/phpmd.git", - "reference": "c0b678ba71902f539c27c14332aa0ddcf14388ec" + "reference": "dad0228156856b3ad959992f9748514fa943f3e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/c0b678ba71902f539c27c14332aa0ddcf14388ec", - "reference": "c0b678ba71902f539c27c14332aa0ddcf14388ec", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/dad0228156856b3ad959992f9748514fa943f3e3", + "reference": "dad0228156856b3ad959992f9748514fa943f3e3", "shasum": "" }, "require": { "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0", "ext-xml": "*", - "pdepend/pdepend": "^2.10.3", + "pdepend/pdepend": "^2.12.1", "php": ">=5.3.9" }, "require-dev": { @@ -1997,7 +2179,18 @@ "phpmd", "pmd" ], - "time": "2022-03-24T13:33:01+00:00" + "support": { + "irc": "irc://irc.freenode.org/phpmd", + "issues": "https://github.com/phpmd/phpmd/issues", + "source": "https://github.com/phpmd/phpmd/tree/2.13.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/phpmd/phpmd", + "type": "tidelift" + } + ], + "time": "2022-09-10T08:44:15+00:00" }, { "name": "phpmetrics/phpmetrics", @@ -2061,6 +2254,10 @@ "quality", "testing" ], + "support": { + "issues": "https://github.com/PhpMetrics/PhpMetrics/issues", + "source": "https://github.com/phpmetrics/PhpMetrics/tree/v2.8.1" + }, "time": "2022-03-24T10:19:51+00:00" }, { @@ -2110,6 +2307,10 @@ "keywords": [ "timer" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/master" + }, "time": "2017-02-26T11:10:40+00:00" }, { @@ -2159,6 +2360,10 @@ "container-interop", "psr" ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/master" + }, "time": "2017-02-14T16:28:37+00:00" }, { @@ -2206,6 +2411,9 @@ "psr", "psr-3" ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, "time": "2021-05-03T11:20:27+00:00" }, { @@ -2245,6 +2453,10 @@ ], "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", "homepage": "https://github.com/sebastianbergmann/finder-facade", + "support": { + "issues": "https://github.com/sebastianbergmann/finder-facade/issues", + "source": "https://github.com/sebastianbergmann/finder-facade/tree/master" + }, "abandoned": true, "time": "2017-11-18T17:31:49+00:00" }, @@ -2296,6 +2508,10 @@ ], "description": "Copy/Paste Detector (CPD) for PHP code.", "homepage": "https://github.com/sebastianbergmann/phpcpd", + "support": { + "issues": "https://github.com/sebastianbergmann/phpcpd/issues", + "source": "https://github.com/sebastianbergmann/phpcpd/tree/master" + }, "time": "2017-11-16T08:49:28+00:00" }, { @@ -2339,6 +2555,10 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, "time": "2016-10-03T07:35:21+00:00" }, { @@ -2390,6 +2610,11 @@ "phpcs", "standards" ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, "time": "2021-12-12T21:44:58+00:00" }, { @@ -2449,6 +2674,23 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-10-24T10:57:07+00:00" }, { @@ -2516,6 +2758,23 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/console/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-10-24T10:57:07+00:00" }, { @@ -2567,6 +2826,23 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/debug/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "abandoned": "symfony/error-handler", "time": "2020-10-24T10:57:07+00:00" }, @@ -2634,6 +2910,23 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-10-24T10:57:07+00:00" }, { @@ -2679,6 +2972,23 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-10-24T10:57:07+00:00" }, { @@ -2723,6 +3033,23 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-11-16T17:02:08+00:00" }, { @@ -2786,6 +3113,23 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.19.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-10-23T09:01:57+00:00" }, { @@ -2829,6 +3173,10 @@ ], "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", "homepage": "https://github.com/theseer/fDOMDocument", + "support": { + "issues": "https://github.com/theseer/fDOMDocument/issues", + "source": "https://github.com/theseer/fDOMDocument/tree/1.6.7" + }, "abandoned": true, "time": "2022-01-25T23:10:35+00:00" } @@ -2842,5 +3190,5 @@ "php": ">=5.6.40" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } From ac1df7691a72d95e33b48e33426ffdb3da03870e Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 11 Nov 2022 13:54:25 +0100 Subject: [PATCH 009/221] - Added new view application/views/system/messages/FAShtmlWriteTemplate.php to be used with FAS/SeaMonkey and TinyMCE3 - Replaced TinyMCE V4 with V5 - Dropped TinyMCE V4 - Added new JS public/js/messaging/fasMessageWrite.js to be included by application/views/system/messages/FAShtmlWriteTemplate.php --- .../system/messages/FASMessages.php | 4 +- application/views/person/bpk/bpkDetails.php | 1 - .../system/infocenter/infocenterDetails.php | 2 +- .../infocenter/infocenterZgvDetails.php | 2 +- .../system/messages/FAShtmlWriteTemplate.php | 197 ++++++++++++++++++ .../views/system/messages/ajaxRead.php | 2 +- .../views/system/messages/ajaxWrite.php | 2 +- .../views/system/messages/ajaxWriteReply.php | 2 +- .../views/system/messages/htmlWriteReply.php | 2 +- .../system/messages/htmlWriteTemplate.php | 2 +- .../views/system/vorlage/templatetextEdit.php | 2 +- application/views/templates/FHC-Common.php | 2 +- application/views/templates/FHC-Footer.php | 4 +- application/views/templates/FHC-Header.php | 3 - application/views/templates/header.php | 2 +- application/views/widgets/tinymce.php | 5 +- public/css/{TinyMCE.css => TinyMCE5.css} | 0 public/js/messaging/fasMessageWrite.js | 140 +++++++++++++ public/js/messaging/messageWrite.js | 11 +- public/js/messaging/write.js | 2 +- 20 files changed, 363 insertions(+), 24 deletions(-) create mode 100644 application/views/system/messages/FAShtmlWriteTemplate.php rename public/css/{TinyMCE.css => TinyMCE5.css} (100%) create mode 100644 public/js/messaging/fasMessageWrite.js diff --git a/application/controllers/system/messages/FASMessages.php b/application/controllers/system/messages/FASMessages.php index 55d1da25f..e2169af9b 100644 --- a/application/controllers/system/messages/FASMessages.php +++ b/application/controllers/system/messages/FASMessages.php @@ -37,7 +37,7 @@ class FASMessages extends Auth_Controller // Loads the view to write a new message with a template $this->load->view( - 'system/messages/htmlWriteTemplate', + 'system/messages/FAShtmlWriteTemplate', $this->CLMessagesModel->prepareHtmlWriteTemplatePrestudents($prestudents) ); } @@ -53,7 +53,7 @@ class FASMessages extends Auth_Controller // Loads the view to write a new message with a template $this->load->view( - 'system/messages/htmlWriteTemplate', + 'system/messages/FAShtmlWriteTemplate', $this->CLMessagesModel->prepareHtmlWriteTemplatePrestudents($prestudents, $message_id, $recipient_id) ); } diff --git a/application/views/person/bpk/bpkDetails.php b/application/views/person/bpk/bpkDetails.php index 198065c24..6b7d4430d 100644 --- a/application/views/person/bpk/bpkDetails.php +++ b/application/views/person/bpk/bpkDetails.php @@ -9,7 +9,6 @@ 'jqueryui1' => true, 'ajaxlib' => true, 'tablesorter2' => true, - 'tinymce4' => true, 'sbadmintemplate3' => true, 'addons' => true, 'navigationwidget' => true, diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index 158feeb2c..15eca90c2 100644 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -8,7 +8,7 @@ 'dialoglib' => true, 'ajaxlib' => true, 'tablesorter2' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'sbadmintemplate3' => true, 'addons' => true, 'navigationwidget' => true, diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index cf3ffad8b..bf9f69e18 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -10,7 +10,7 @@ 'dialoglib' => true, 'ajaxlib' => true, 'tablesorter2' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'sbadmintemplate3' => true, 'addons' => true, 'navigationwidget' => true, diff --git a/application/views/system/messages/FAShtmlWriteTemplate.php b/application/views/system/messages/FAShtmlWriteTemplate.php new file mode 100644 index 000000000..691629c10 --- /dev/null +++ b/application/views/system/messages/FAShtmlWriteTemplate.php @@ -0,0 +1,197 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => 'Write a new message or reply using templates', + 'jquery3' => true, + 'jqueryui1' => true, + 'bootstrap3' => true, + 'ajaxlib' => true, + 'fontawesome4' => true, + 'tinymce3' => true, + 'sbadmintemplate3' => true, + 'dialoglib' => true, + 'widgets' => true, + 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'), + 'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/fasMessageWrite.js') + ) + ); +?> + +
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+   +
+ +
+
+
+
+
+
+ + +
+
+
+ + + 19 ? 19 : count($variables); + echo $this->widgetlib->widget( + 'MultipleDropdown_widget', + array('elements' => success($variables)), + array( + 'name' => 'variables[]', + 'id' => 'variables', + 'size' => $size, + 'multiple' => true + ) + ); + ?> +
+
+
+ + + 5 ? 5 : count($user_fields); + echo $this->widgetlib->widget( + 'MultipleDropdown_widget', + array('elements' => success($user_fields)), + array( + 'name' => 'user_fields[]', + 'id' => 'user_fields', + 'size' => $size, + 'multiple' => true + ) + ); + ?> +
+
+
+
+
+
+ + widgetlib->widget( + 'Vorlage_widget', + array('oe_kurzbz' => $organisationUnits, 'isAdmin' => $senderIsAdmin), + array('name' => 'vorlage', 'id' => 'vorlageDnD') + ); + ?> + +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ widgetlib->widget( + 'Dropdown_widget', + array( + 'elements' => success($recipientsArray), + 'emptyElement' => ucfirst($this->p->t('global', 'empfaenger')).'...' + ), + array( + 'name' => 'recipients[]', + 'id' => 'recipients' + ) + ); + ?> + + + p->t('ui', 'refresh')); ?> + + +
+
+
+
+
+ +
+ + + + + +
+
+
+
+ + +load->view("templates/FHC-Footer"); ?> + diff --git a/application/views/system/messages/ajaxRead.php b/application/views/system/messages/ajaxRead.php index 2cb88708e..4c1a77deb 100644 --- a/application/views/system/messages/ajaxRead.php +++ b/application/views/system/messages/ajaxRead.php @@ -12,7 +12,7 @@ 'tabulator4' => true, 'ajaxlib' => true, 'dialoglib' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'phrases' => array('global', 'ui'), 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'), 'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/read.js') diff --git a/application/views/system/messages/ajaxWrite.php b/application/views/system/messages/ajaxWrite.php index 3b1582f22..b3a598506 100644 --- a/application/views/system/messages/ajaxWrite.php +++ b/application/views/system/messages/ajaxWrite.php @@ -10,7 +10,7 @@ 'sbadmintemplate3' => true, 'ajaxlib' => true, 'dialoglib' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'phrases' => array('global', 'ui'), 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'), 'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/write.js') diff --git a/application/views/system/messages/ajaxWriteReply.php b/application/views/system/messages/ajaxWriteReply.php index 0a496c93e..08dc188fa 100644 --- a/application/views/system/messages/ajaxWriteReply.php +++ b/application/views/system/messages/ajaxWriteReply.php @@ -10,7 +10,7 @@ 'sbadmintemplate3' => true, 'ajaxlib' => true, 'dialoglib' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'phrases' => array('global', 'ui'), 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'), 'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/writeReply.js') diff --git a/application/views/system/messages/htmlWriteReply.php b/application/views/system/messages/htmlWriteReply.php index 9106d802b..d2150c1fb 100644 --- a/application/views/system/messages/htmlWriteReply.php +++ b/application/views/system/messages/htmlWriteReply.php @@ -6,7 +6,7 @@ 'jquery3' => true, 'bootstrap3' => true, 'fontawesome4' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'sbadmintemplate3' => true, 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'), 'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/messageWriteReply.js') diff --git a/application/views/system/messages/htmlWriteTemplate.php b/application/views/system/messages/htmlWriteTemplate.php index 761e05f96..42a31f374 100644 --- a/application/views/system/messages/htmlWriteTemplate.php +++ b/application/views/system/messages/htmlWriteTemplate.php @@ -8,7 +8,7 @@ 'bootstrap3' => true, 'ajaxlib' => true, 'fontawesome4' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'sbadmintemplate3' => true, 'dialoglib' => true, 'widgets' => true, diff --git a/application/views/system/vorlage/templatetextEdit.php b/application/views/system/vorlage/templatetextEdit.php index 42efc1519..cc2487959 100644 --- a/application/views/system/vorlage/templatetextEdit.php +++ b/application/views/system/vorlage/templatetextEdit.php @@ -1,5 +1,5 @@ load->view('templates/header', array('title' => 'VorlageEdit', 'tinymce4' => true, 'jsonforms' => true)); + $this->load->view('templates/header', array('title' => 'VorlageEdit', 'tinymce5' => true, 'jsonforms' => true)); ?>
diff --git a/application/views/templates/FHC-Common.php b/application/views/templates/FHC-Common.php index dd1d8ae1c..27282bc11 100644 --- a/application/views/templates/FHC-Common.php +++ b/application/views/templates/FHC-Common.php @@ -23,7 +23,7 @@ $tablesorter2 = isset($tablesorter2) ? $tablesorter2 : false; $tabulator4 = isset($tabulator4) ? $tabulator4 : false; $tabulator5 = isset($tabulator5) ? $tabulator5 : false; - $tinymce4 = isset($tinymce4) ? $tinymce4 : false; + $tinymce3 = isset($tinymce3) ? $tinymce3 : false; $tinymce5 = isset($tinymce5) ? $tinymce5 : false; $vue3 = isset($vue3) ? $vue3 : false; $primevue3 = isset($primevue3) ? $primevue3 : false; diff --git a/application/views/templates/FHC-Footer.php b/application/views/templates/FHC-Footer.php index 0c3782fea..ee13c69d2 100644 --- a/application/views/templates/FHC-Footer.php +++ b/application/views/templates/FHC-Footer.php @@ -100,8 +100,8 @@ // Tabulator 5 JS if ($tabulator5 === true) generateJSsInclude('vendor/olifolkerd/tabulator5/dist/js/tabulator.min.js'); - // Tinymce 4 JS - if ($tinymce4 === true) generateJSsInclude('vendor/tinymce/tinymce4/tinymce.min.js'); + // Tinymce 3 JS + if ($tinymce3 === true) generateJSsInclude('include/tiny_mce/tiny_mce.js'); // Tinymce 5 JS if ($tinymce5 === true) generateJSsInclude('vendor/tinymce/tinymce5/tinymce.min.js'); diff --git a/application/views/templates/FHC-Header.php b/application/views/templates/FHC-Header.php index aa63541c5..47eea34ec 100644 --- a/application/views/templates/FHC-Header.php +++ b/application/views/templates/FHC-Header.php @@ -79,9 +79,6 @@ // Tabulator 5 CSS if ($tabulator5 === true) generateCSSsInclude('vendor/olifolkerd/tabulator5/dist/css/tabulator_bootstrap5.min.css'); - // Tinymce 4 CSS - if ($tinymce4 === true) generateCSSsInclude('public/css/TinyMCE4.css'); - // Tinymce 5 CSS if ($tinymce5 === true) generateCSSsInclude('public/css/TinyMCE5.css'); diff --git a/application/views/templates/header.php b/application/views/templates/header.php index 637eb3c7a..e75acca4f 100644 --- a/application/views/templates/header.php +++ b/application/views/templates/header.php @@ -95,7 +95,7 @@ if($jqueryV1 && $jqueryV2) show_error("Two JQuery versions used: composer and in - + diff --git a/application/views/widgets/tinymce.php b/application/views/widgets/tinymce.php index 3e2093e55..618cb4836 100644 --- a/application/views/widgets/tinymce.php +++ b/application/views/widgets/tinymce.php @@ -5,5 +5,6 @@ plugins: [], toolbar: "" }); - - < name="" style="">> + +< name="" style="">> + diff --git a/public/css/TinyMCE.css b/public/css/TinyMCE5.css similarity index 100% rename from public/css/TinyMCE.css rename to public/css/TinyMCE5.css diff --git a/public/js/messaging/fasMessageWrite.js b/public/js/messaging/fasMessageWrite.js new file mode 100644 index 000000000..d32f80fac --- /dev/null +++ b/public/js/messaging/fasMessageWrite.js @@ -0,0 +1,140 @@ +// ******************************************************** +// JS used by view system/messages/htmlWriteTemplate +// ******************************************************** + +function tinymcePreviewSetContent() +{ + if ($("#tinymcePreview")) + { + if ($("#recipients").children(":selected").val() > -1) + { + parseMessageText($("#recipients").children(":selected").val(), tinyMCE.get("bodyTextArea").getContent()); + } + else + { + tinyMCE.get("tinymcePreview").setContent(""); + } + } +} + +function parseMessageText(receiver_id, text) +{ + FHC_AjaxClient.ajaxCallPost( + "system/messages/Messages/parseMessageText", + { + receiver_id: receiver_id, + text: text, + type: $("#type").val() + }, + { + successCallback: function(data, textStatus, jqXHR) { + + if (FHC_AjaxClient.hasData(data)) + { + tinyMCE.get("tinymcePreview").setContent(FHC_AjaxClient.getData(data)); + } + else if (FHC_AjaxClient.isError(data)) + { + FHC_DialogLib.alertError(data.retval); + } + } + } + ); +} + +$(document).ready(function () +{ + + tinymce.init({ + theme : "advanced", + mode : "textareas" + }); + + if ($("#variables")) + { + $("#variables").dblclick(function () + { + if ($("#bodyTextArea")) + { + //if editor active add at cursor position, otherwise at end + if (tinymce.activeEditor.id === "bodyTextArea") + tinymce.activeEditor.execCommand('mceInsertContent', false, $(this).children(":selected").val()); + else + tinyMCE.get("bodyTextArea").setContent(tinyMCE.get("bodyTextArea").getContent() + $(this).children(":selected").val()); + } + }); + } + + if ($("#user_fields")) + { + $("#user_fields").dblclick(function () + { + if ($("#bodyTextArea")) + { + //if editor active add at cursor position, otherwise at end + if (tinymce.activeEditor.id === "bodyTextArea") + tinymce.activeEditor.execCommand('mceInsertContent', false, $(this).children(":selected").val()); + else + tinyMCE.get("bodyTextArea").setContent(tinyMCE.get("bodyTextArea").getContent() + $(this).children(":selected").val()); + } + }); + } + + if ($("#recipients")) + { + $("#recipients").change(tinymcePreviewSetContent); + } + + if ($("#refresh")) + { + $("#refresh").click(tinymcePreviewSetContent); + } + + if ($("#sendButton") && $("#sendForm")) + { + $("#sendButton").click(function () + { + if ($("#subject") && $("#subject").val() != '' && tinyMCE.get("bodyTextArea").getContent() != '') + { + $("#sendForm").submit(); + } + else + { + FHC_DialogLib.alertInfo("Subject and text are required fields!"); + } + }); + } + + if ($("#vorlageDnD")) + { + $("#vorlageDnD").change(function () + { + var vorlage_kurzbz = this.value; + + if (vorlage_kurzbz != '') + { + FHC_AjaxClient.ajaxCallGet( + "system/messages/Messages/getVorlage", + { + vorlage_kurzbz: vorlage_kurzbz + }, + { + successCallback: function(data, textStatus, jqXHR) { + + if (FHC_AjaxClient.hasData(data)) + { + var msg = FHC_AjaxClient.getData(data); + + tinyMCE.get("bodyTextArea").setContent(msg[0].text); + $("#subject").val(msg[0].subject); + } + } + } + ); + } + }); + } + + $("#subject").focus(); + +}); diff --git a/public/js/messaging/messageWrite.js b/public/js/messaging/messageWrite.js index 8b1d73bdf..382e79948 100644 --- a/public/js/messaging/messageWrite.js +++ b/public/js/messaging/messageWrite.js @@ -42,8 +42,8 @@ function parseMessageText(receiver_id, text) ); } -$(document).ready(function () -{ +$(document).ready(function () { + tinymce.init({ selector: "#bodyTextArea", plugins: "autoresize", @@ -60,7 +60,12 @@ $(document).ready(function () menubar: false, toolbar: false, statusbar: false, - readonly: 1 + readonly: 1, + autoresize_on_init: false, + autoresize_min_height: 400, + autoresize_max_height: 700, + autoresize_bottom_margin: 10, + auto_focus: "bodyTextArea" }); if ($("#variables")) diff --git a/public/js/messaging/write.js b/public/js/messaging/write.js index 1370fb2e0..bff451c2e 100644 --- a/public/js/messaging/write.js +++ b/public/js/messaging/write.js @@ -63,7 +63,7 @@ $(document).ready(function () { tinymce.init({ selector: "#body", plugins: "autoresize", - autoresize_min_height: 150, + autoresize_min_height: 300, autoresize_max_height: 600, autoresize_bottom_margin: 10 }); From 540fc4bede933b704d2d69aeb0325bcc0da780c0 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 15 Nov 2022 11:22:47 +0100 Subject: [PATCH 010/221] 26198 Notenimport ausschliesslich bei vorhandener Note --- .../lehre/benotungstool/nachpruefungeintragen.php | 12 +++++++++++- locale/de-AT/benotungstool.php | 3 ++- locale/en-US/benotungstool.php | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cis/private/lehre/benotungstool/nachpruefungeintragen.php b/cis/private/lehre/benotungstool/nachpruefungeintragen.php index 290113179..bf0d4b197 100644 --- a/cis/private/lehre/benotungstool/nachpruefungeintragen.php +++ b/cis/private/lehre/benotungstool/nachpruefungeintragen.php @@ -95,6 +95,8 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) { $errorMatrnr = ''; $errorDatum = ''; + $errorNachp = ''; + foreach ($_POST as $row => $val) { if(mb_strstr(mb_strtolower($row), 'student_uid_')) @@ -140,6 +142,14 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) } } + //check ob eine Note vorhanden ist oder (intern) angerechnet wurde + $lvnote = new lvgesamtnote(); + if (!$lvnote->load($lvid, $student_uid, $stsem)) + { + $errorNachp.="\n".$p->t('benotungstool/NachpruefungNichtZulaessig', array($student_uid)); + continue; + } + $lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem); if(isset($_POST['student_uid_'.$id]) && (isset($_POST['note_'.$id]) || isset($_POST['punkte_'.$id])) && isset($_POST['datumNachp_'.$id])) @@ -152,7 +162,7 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) } } } - echo $errorMatrnr . $errorDatum; + echo $errorMatrnr . $errorDatum . $errorNachp; } else { diff --git a/locale/de-AT/benotungstool.php b/locale/de-AT/benotungstool.php index feac092f6..d6e77d3ce 100644 --- a/locale/de-AT/benotungstool.php +++ b/locale/de-AT/benotungstool.php @@ -150,8 +150,9 @@ $this->phrasen['benotungstool/kreuzerltool']='Kreuzerltool'; $this->phrasen['benotungstool/studentIstLvNichtZugeordnet']='Der Student %s %s (%s) ist dieser Lehrveranstaltung nicht zugeordnet. Die Note wird nicht uebernommen!'; $this->phrasen['benotungstool/studentMitMatrikelnummerExistiertNicht']='Student*in mit Matrikelnummer %s existiert nicht.'; $this->phrasen['benotungstool/datumsformatUnzulaessig']='Das Datum %s entspricht nicht dem Format TT.MM.JJJJ!'; +$this->phrasen['benotungstool/NachpruefungNichtZulaessig']='Nachprüfung für Student*in %s nicht zulässig.'; $this->phrasen['benotungstool/noteUnzulaessig']='Die Note %s ist nicht zulaessig. Die Zeile wurde uebersprungen.'; -$this->phrasen['benotungstool/noteNichtUeberschreibbar']='Für Student mit Matrikelnummer %s eingetragene Zeugnisote %s ist nicht überschreibbar'; +$this->phrasen['benotungstool/noteNichtUeberschreibbar']='Für Student mit Matrikelnummer %s eingetragene Zeugnisnote %s ist nicht überschreibbar'; $this->phrasen['benotungstool/fehlerhafteNoteBeiStudent']='Fehlerhafte Note bei Student %s %s'; $this->phrasen['benotungstool/keineKreuzerllistenFuerDieseLehrveranstaltung']='Derzeit gibt es keine Kreuzerllisten für diese Lehrveranstaltung'; $this->phrasen['benotungstool/notenuebersichtFuer']='Notenübersicht für'; diff --git a/locale/en-US/benotungstool.php b/locale/en-US/benotungstool.php index f482409d8..73a3bd343 100644 --- a/locale/en-US/benotungstool.php +++ b/locale/en-US/benotungstool.php @@ -148,6 +148,7 @@ $this->phrasen['benotungstool/pruefungAnlegenFuer']='Create an examination for ' $this->phrasen['benotungstool/kreuzerltool']='"Kreuzerl" tool'; $this->phrasen['benotungstool/studentIstLvNichtZugeordnet']='Student is not assigned to this course. The grade was not accepted!'; $this->phrasen['benotungstool/studentMitMatrikelnummerExistiertNicht']='Student with student ID number %s does not exist.'; +$this->phrasen['benotungstool/NachpruefungNichtZulaessig']='Re-examination for student %s not allowed.'; $this->phrasen['benotungstool/datumsformatUnzulaessig']='The date %s is not in valid format TT.MM.JJJJ.'; $this->phrasen['benotungstool/noteNichtUeberschreibbar']='Transcript grade %2$s for student with Personal identifier %1$s is not rewritable'; $this->phrasen['benotungstool/fehlerhafteNoteBeiStudent']='Incorrect grade for student %s %s'; From d9098179a25cf789e29dc29a1407445112ce4d06 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 14 Dec 2022 12:40:38 +0100 Subject: [PATCH 011/221] - ermoeglicht es master bewerber sich ueber das bewerbungstool anzumelden --- include/reihungstest.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/reihungstest.class.php b/include/reihungstest.class.php index 0140816ab..5c8e5854e 100644 --- a/include/reihungstest.class.php +++ b/include/reihungstest.class.php @@ -685,11 +685,15 @@ class reihungstest extends basis_db tbl_reihungstest.studiensemester_kurzbz, tbl_reihungstest.stufe, tbl_reihungstest.anmeldefrist, - tbl_reihungstest.aufnahmegruppe_kurzbz + tbl_reihungstest.aufnahmegruppe_kurzbz, + tbl_studiengang.typ, + tbl_studiengang.kurzbzlang FROM public.tbl_rt_person JOIN public.tbl_reihungstest ON (rt_id=reihungstest_id) + LEFT JOIN + public.tbl_studiengang ON tbl_reihungstest.studiengang_kz = tbl_studiengang.studiengang_kz WHERE tbl_rt_person.person_id=".$this->db_add_param($person_id); @@ -728,6 +732,8 @@ class reihungstest extends basis_db $obj->stufe = $row->stufe; $obj->anmeldefrist = $row->anmeldefrist; $obj->aufnahmegruppe_kurzbz = $row->aufnahmegruppe_kurzbz; + $obj->typ = $row->typ; + $obj->kurzbzlang = $row->kurzbzlang; $this->result[] = $obj; } From ed99325bb933d7fee02fffc50014d28f287f8d01 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 10 Jan 2023 09:04:53 +0100 Subject: [PATCH 012/221] - anpassungen fuer master bewerbungen --- include/reihungstest.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/reihungstest.class.php b/include/reihungstest.class.php index 5c8e5854e..42af8ea7a 100644 --- a/include/reihungstest.class.php +++ b/include/reihungstest.class.php @@ -687,7 +687,7 @@ class reihungstest extends basis_db tbl_reihungstest.anmeldefrist, tbl_reihungstest.aufnahmegruppe_kurzbz, tbl_studiengang.typ, - tbl_studiengang.kurzbzlang + UPPER(typ::varchar(1) || kurzbz) AS stg_kuerzel FROM public.tbl_rt_person JOIN @@ -733,7 +733,7 @@ class reihungstest extends basis_db $obj->anmeldefrist = $row->anmeldefrist; $obj->aufnahmegruppe_kurzbz = $row->aufnahmegruppe_kurzbz; $obj->typ = $row->typ; - $obj->kurzbzlang = $row->kurzbzlang; + $obj->stg_kuerzel = $row->stg_kuerzel; $this->result[] = $obj; } From 84ca798dadc5ad814a949d69093ae3d113b369b9 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Wed, 8 Mar 2023 13:50:33 +0100 Subject: [PATCH 013/221] add format to set text as format for date columns and highlight them --- cis/private/lehre/notenliste.xls.php | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/cis/private/lehre/notenliste.xls.php b/cis/private/lehre/notenliste.xls.php index 4a6817a36..42dcc8418 100644 --- a/cis/private/lehre/notenliste.xls.php +++ b/cis/private/lehre/notenliste.xls.php @@ -121,6 +121,13 @@ else $format_highlightright->setBorderColor('white'); $format_highlightright->setAlign('right'); + $format_highlightright_date=& $workbook->addFormat(); + $format_highlightright_date->setFgColor(15); + $format_highlightright_date->setBorder(1); + $format_highlightright_date->setBorderColor('white'); + $format_highlightright_date->setAlign('right'); + $format_highlightright_date->setNumFormat(49); + $format_border_bottom =& $workbook->addFormat(); $format_border_bottom ->setBottom(2); $format_border_bottom->setBold(); @@ -230,7 +237,7 @@ else if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) { $worksheet->write($lines,12,$p->t('global/uid'),$format_border_bottom); - $worksheet->write($lines,13,$p->t('global/uid'),$format_border_bottom); + $worksheet->write($lines,13,$p->t('global/datum'),$format_border_bottom); if(defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE) $worksheet->write($lines,14,$p->t('benotungstool/punkte'),$format_border_bottom); else @@ -328,9 +335,14 @@ else if ($output2) { $resultPr = $output2[0]; - $worksheet->write($lines,9, date('d.m.Y', strtotime($resultPr->datum)), $format_highlightright); + $worksheet->write($lines,9, date('d.m.Y', strtotime($resultPr->datum)), $format_highlightright_date); $worksheet->write($lines,10, $resultPr->note, $format_highlightright); } + else + { + $worksheet->write($lines,9, '', $format_highlightright_date); + $worksheet->write($lines,10, '', $format_highlightright); + } } // Nachprüfung @@ -344,9 +356,14 @@ else if ($output3) { $resultPr = $output3[0]; - $worksheet->write($lines,13, date('d.m.Y', strtotime($resultPr->datum)), $format_highlightright); + $worksheet->write($lines,13, date('d.m.Y', strtotime($resultPr->datum)), $format_highlightright_date); $worksheet->write($lines,14, $resultPr->note, $format_highlightright); } + else + { + $worksheet->write($lines,13, '', $format_highlightright_date); + $worksheet->write($lines,14, '', $format_highlightright); + } } $i++; From 25313a8f527cd7d8964cab01fbb8f5a75298a551 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 23 Mar 2023 14:34:37 +0100 Subject: [PATCH 014/221] Code quality check fixes --- application/views/person/bpk/bpkDetails.php | 12 ++++++++++-- .../views/system/infocenter/infocenterZgvDetails.php | 6 +++++- application/views/templates/FHC-Footer.php | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/application/views/person/bpk/bpkDetails.php b/application/views/person/bpk/bpkDetails.php index 6b7d4430d..bd6191c6a 100644 --- a/application/views/person/bpk/bpkDetails.php +++ b/application/views/person/bpk/bpkDetails.php @@ -125,10 +125,18 @@
-
+ - +
diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index bf9f69e18..3a254b16a 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -130,7 +130,11 @@ p->t('infocenter', 'zgvNichtErfuellt') ?> - diff --git a/application/views/templates/FHC-Footer.php b/application/views/templates/FHC-Footer.php index ee13c69d2..a9a44b978 100644 --- a/application/views/templates/FHC-Footer.php +++ b/application/views/templates/FHC-Footer.php @@ -107,7 +107,7 @@ if ($tinymce5 === true) generateJSsInclude('vendor/tinymce/tinymce5/tinymce.min.js'); // Vue 3 JS - if ($vue3 === true) + if ($vue3 === true) { generateJSsInclude('vendor/vuejs/vuejs3/vue.global.prod.js'); generateJSsInclude('vendor/vuejs/vuerouter4/vue-router.global.js'); From 3e056ebf3d35c6eacae1fd042e9358c3925c532c Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 24 Mar 2023 15:21:01 +0100 Subject: [PATCH 015/221] =?UTF-8?q?Notenimport=20Nachpr=C3=BCfung=20und=20?= =?UTF-8?q?3.Termin:=20Erg=C3=A4nzung=20um=20nicht=20numerische=20Noten?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../benotungstool/nachpruefungeintragen.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/cis/private/lehre/benotungstool/nachpruefungeintragen.php b/cis/private/lehre/benotungstool/nachpruefungeintragen.php index bf0d4b197..804ab34fb 100644 --- a/cis/private/lehre/benotungstool/nachpruefungeintragen.php +++ b/cis/private/lehre/benotungstool/nachpruefungeintragen.php @@ -42,6 +42,7 @@ require_once('../../../../include/benutzer.class.php'); require_once('../../../../include/student.class.php'); require_once('../../../../include/notenschluessel.class.php'); require_once('../../../../include/phrasen.class.php'); +require_once('../../../../include/note.class.php'); if (!$db = new basis_db()) @@ -79,6 +80,17 @@ $stsem_obj = new studiensemester(); if($stsem=='') $stsem = $stsem_obj->getaktorNext(); +//Notenanmerkung für Eintragung von nichtnumerischen Noten wie en (entschuldigt), ue(unentschuldigt) +$noten_anmerkung = array(); +$noten_arr = array(); +$note_obj = new note(); +$note_obj->getAll(); +foreach($note_obj->result as $row) +{ + $noten_anmerkung[$row->anmerkung] = $row->note; + $noten_arr[$row->note] = $row; +} + if(!isset($_GET['typ'])) { $typ='Termin2'; @@ -96,7 +108,7 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) $errorMatrnr = ''; $errorDatum = ''; $errorNachp = ''; - + foreach ($_POST as $row => $val) { if(mb_strstr(mb_strtolower($row), 'student_uid_')) @@ -154,6 +166,11 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) if(isset($_POST['student_uid_'.$id]) && (isset($_POST['note_'.$id]) || isset($_POST['punkte_'.$id])) && isset($_POST['datumNachp_'.$id])) { + if(!is_numeric($note)) + { + if(isset($noten_anmerkung[$note])) + $note = $noten_anmerkung[$note]; + } $response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte); } else From 76c4c4a0e916226273063c30cc4463d051e36b62 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 27 Mar 2023 08:15:29 +0200 Subject: [PATCH 016/221] Termin 3 als pruefungstyp in lehre.tbl_pruefungstyp in dbupdate hinterlegt --- system/dbupdate_3.4.php | 1 + .../25003_notenimport_nachpruefung.php | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 system/dbupdate_3.4/25003_notenimport_nachpruefung.php diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index c3600d250..2597a0e4c 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -27,6 +27,7 @@ require_once('dbupdate_3.4/example.php'); require_once('dbupdate_3.4/example2.php'); ... */ +require_once('dbupdate_3.4/25003_notenimport_nachpruefung.php'); // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/dbupdate_3.4/25003_notenimport_nachpruefung.php b/system/dbupdate_3.4/25003_notenimport_nachpruefung.php new file mode 100644 index 000000000..7c2406d0e --- /dev/null +++ b/system/dbupdate_3.4/25003_notenimport_nachpruefung.php @@ -0,0 +1,15 @@ +db_query("SELECT 1 FROM lehre.tbl_pruefungstyp WHERE pruefungstyp_kurzbz='Termin3'")) +{ + if($db->db_num_rows($result)==0) + { + $qry = "INSERT INTO lehre.tbl_pruefungstyp(pruefungstyp_kurzbz, beschreibung, abschluss) VALUES('Termin3', '3.Termin', false);"; + + if(!$db->db_query($qry)) + echo 'Prüfungstyp: '.$db->db_last_error().'
'; + else + echo '
Prüfungstyp 3.Termin in lehre.tbl_pruefungstyp hinzugefügt'; + } +} From 80d5d09ed582462e1eb021799635d3f4246777c8 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Tue, 4 Apr 2023 08:07:03 +0200 Subject: [PATCH 017/221] fix styling of textarea in import popup --- .../lehre/benotungstool/lvgesamtnoteverwalten.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index 4dcd6c7cf..d498636ae 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -145,8 +145,8 @@ echo ' position:absolute; top:100px; left:300px; - width:400px; - height:200px; + min-width:450px; + min-height:200px; background-color:#cccccc; visibility:hidden; border-style:solid; @@ -594,8 +594,8 @@ foreach ($noten_obj->result as $row) str += "X"; var anlegendiv = document.getElementById("nachpruefung_div"); var y = getOffset('y'); y = y+50; anlegendiv.style.top = y+"px"; - str += 't('benotungstool/importAnweisung');?>:'; - str += ''; + str += '
t('benotungstool/importAnweisung');?>:
'; + str += ''; str += "' onclick='saveGradeBulk();'>"; str += ""; anlegendiv.innerHTML = str; @@ -612,8 +612,8 @@ foreach ($noten_obj->result as $row) str += "X"; var anlegendiv = document.getElementById("nachpruefung_div"); var y = getOffset('y'); y = y+50; anlegendiv.style.top = y+"px"; - str += 't('benotungstool/importAnweisungNachp');?>:'; - str += ''; + str += '
t('benotungstool/importAnweisungNachp');?>:
'; + str += ''; str += "' onclick='saveGradeBulkNachp(\""+ termin +"\");'>"; str += ""; From fb57ea5838731be8532efd2fc5c5e8add5d8feb6 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 4 Apr 2023 15:57:33 +0200 Subject: [PATCH 018/221] - splitten von reihungstest uebersichten --- include/reihungstest.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/reihungstest.class.php b/include/reihungstest.class.php index 42af8ea7a..2da424af5 100644 --- a/include/reihungstest.class.php +++ b/include/reihungstest.class.php @@ -687,7 +687,9 @@ class reihungstest extends basis_db tbl_reihungstest.anmeldefrist, tbl_reihungstest.aufnahmegruppe_kurzbz, tbl_studiengang.typ, - UPPER(typ::varchar(1) || kurzbz) AS stg_kuerzel + UPPER(typ::varchar(1) || kurzbz) AS stg_kuerzel, + tbl_studiengang.bezeichnung, + tbl_studiengang.english FROM public.tbl_rt_person JOIN @@ -734,6 +736,8 @@ class reihungstest extends basis_db $obj->aufnahmegruppe_kurzbz = $row->aufnahmegruppe_kurzbz; $obj->typ = $row->typ; $obj->stg_kuerzel = $row->stg_kuerzel; + $obj->bezeichnung = $row->bezeichnung; + $obj->english = $row->english; $this->result[] = $obj; } From 39137d1348a01d90fee89863d7f22bbec9e3b604 Mon Sep 17 00:00:00 2001 From: Paolo Date: Mon, 24 Apr 2023 17:07:40 +0200 Subject: [PATCH 019/221] Load a model in the filter component controller to have the DB functionalities ready --- application/controllers/components/Filter.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/controllers/components/Filter.php b/application/controllers/components/Filter.php index ab7e1493e..bde7d7ed7 100644 --- a/application/controllers/components/Filter.php +++ b/application/controllers/components/Filter.php @@ -26,6 +26,9 @@ class Filter extends FHC_Controller // Loads authentication library and starts authentication $this->load->library('AuthLib'); + // Loads the FiltersModel + $this->load->model('system/Filters_model', 'FiltersModel'); + // Loads the FilterCmptLib with HTTP GET/POST parameters $this->_startFilterCmptLib(); } From da484fbbb07d7017fb232872e35562a292976294 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 25 Apr 2023 08:45:16 +0200 Subject: [PATCH 020/221] - die letzten 5 tage werden geprueft anstatt nur der vortag - neue bewerbungen nach dem aufgenommen status werden nich automatisch abgewiesen --- application/controllers/jobs/ReihungstestJob.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/application/controllers/jobs/ReihungstestJob.php b/application/controllers/jobs/ReihungstestJob.php index ab6c429a0..431ac5b04 100644 --- a/application/controllers/jobs/ReihungstestJob.php +++ b/application/controllers/jobs/ReihungstestJob.php @@ -3,6 +3,9 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); class ReihungstestJob extends JOB_Controller { + + const LAST_DAYS_PRESTUDENTSTATUS = 5; + /** * Constructor */ @@ -826,7 +829,7 @@ class ReihungstestJob extends JOB_Controller AND tbl_studiengang.typ IN ('b', 'm') ) SELECT * FROM prst - WHERE prestudenstatus_datum >= (SELECT CURRENT_DATE - 1) + WHERE prestudenstatus_datum >= (SELECT CURRENT_DATE - ". self::LAST_DAYS_PRESTUDENTSTATUS .") AND (studiengang_typ = 'b' OR (studiengang_typ = 'm' AND EXISTS (SELECT 1 /* Master Studiengänge berücksichtigen wenn auch Bachelor im gleichen Semester */ FROM prst prstb WHERE studiengang_typ = 'b' @@ -868,7 +871,8 @@ class ReihungstestJob extends JOB_Controller tbl_person.nachname, tbl_person.vorname, tbl_prestudent.*, - tbl_studiengang.typ AS studiengang_typ + tbl_studiengang.typ AS studiengang_typ, + tbl_prestudentstatus.datum FROM PUBLIC.tbl_person JOIN PUBLIC.tbl_prestudent USING (person_id) JOIN PUBLIC.tbl_prestudentstatus USING (prestudent_id) @@ -901,7 +905,7 @@ class ReihungstestJob extends JOB_Controller $mailArray[$rowNiedrPrios->studiengang_kz][$rowNiedrPrios->orgform_kurzbz]['AufnahmeHoeherePrio'][] = $rowNiedrPrios->nachname.' '.$rowNiedrPrios->vorname.' ('.$rowNiedrPrios->prestudent_id.')'; } - elseif ($rowNiedrPrios->laststatus == 'Bewerber') + elseif ($rowNiedrPrios->laststatus == 'Bewerber' && $row_ps->prestudenstatus_datum > $rowNiedrPrios->datum) { // Abgewiesenen-Status mit Statusgrund "Aufnahme anderer Studiengang" (ID 5) setzen $lastStatus = $this->PrestudentstatusModel->getLastStatus($rowNiedrPrios->prestudent_id); @@ -927,7 +931,7 @@ class ReihungstestJob extends JOB_Controller = $rowNiedrPrios->nachname.' '.$rowNiedrPrios->vorname.' ('.$rowNiedrPrios->prestudent_id.')'; } } - elseif ($rowNiedrPrios->laststatus == 'Wartender') + elseif ($rowNiedrPrios->laststatus == 'Wartender' && $row_ps->prestudenstatus_datum > $rowNiedrPrios->datum) { // Abgewiesenen-Status mit Statusgrund "Aufnahme anderer Studiengang" (ID 5) setzen // Mail zur Info an Assistenz schicken From 33e313a633a4001f01b1ce55c4dec39f62c2d2e1 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 8 May 2023 12:12:42 +0200 Subject: [PATCH 021/221] update Abfrage --- application/inputFileTest.csv | 8 +++++ application/tmp/inputFile.csv | 49 +++++++++++++++++++++++++++ application/tmp/inputFileMitError.csv | 11 ++++++ application/tmp/inputFileUltra.csv | 8 +++++ cis/private/lehre/notenliste.xls.php | 7 ++-- 5 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 application/inputFileTest.csv create mode 100644 application/tmp/inputFile.csv create mode 100644 application/tmp/inputFileMitError.csv create mode 100644 application/tmp/inputFileUltra.csv diff --git a/application/inputFileTest.csv b/application/inputFileTest.csv new file mode 100644 index 000000000..927dc0062 --- /dev/null +++ b/application/inputFileTest.csv @@ -0,0 +1,8 @@ +uid,studiensemester,moodle_course_shortname,moodle_course_fullname,moodle_course_url +aburaia,SS2016,BMR4_MLAB2_2016,BMR4_Mechatronics-Lab2_2016,https://moodle.technikum-wien.at/course/view.php?id=2948 +aburaia,WS2016,MMR-VZB-3-WS2016-PRJ,Projekt,https://moodle.technikum-wien.at/course/view.php?id=3643 +adams,SS2016,BEW-BB-4-SS2016-ENG/67791,Business English 2,https://moodle.technikum-wien.at/course/view.php?id=3034 +adams,SS2016,BEW-DL-2-SS2016-ENG,Technical and Creative Communication,https://moodle.technikum-wien.at/course/view.php?id=2873 +krizek,SS2016,BVU-VZ-6-SS2016-PSB,Praxissemesterbegleitung,https://moodle.technikum-wien.at/course/view.php?id=3157 +krizek,SS2016,MIT-VZ-2-SS2016-ITS PRJ I,ITS Project I,https://moodle.technikum-wien.at/course/view.php?id=3175 +krizek,WS2016,MSC-VZ-3-WS2016-IP2,ITS Project II,https://moodle.technikum-wien.at/course/view.php?id=3713 diff --git a/application/tmp/inputFile.csv b/application/tmp/inputFile.csv new file mode 100644 index 000000000..48411ca1a --- /dev/null +++ b/application/tmp/inputFile.csv @@ -0,0 +1,49 @@ +uid,studiensemester,moodle_course_shortname,moodle_course_fullname,moodle_course_url +aburaia,SS2016,BMR4_MLAB2_2016,BMR4_Mechatronics-Lab2_2016,https://moodle.technikum-wien.at/course/view.php?id=2948 +aburaia,SS2016,BMR6_MES_2016,BMR6_Mechatronische-Systeme_2016,https://moodle.technikum-wien.at/course/view.php?id=2951 +aburaia,SS2016,BMR-VZ-6-SS2016-EMS,Entwurf mechatronischer Systeme,https://moodle.technikum-wien.at/course/view.php?id=2833 +aburaia,WS2016,BMB-VZ-5-WS2016-DF,Industrierobotik in der Digitalen Fabrik,https://moodle.technikum-wien.at/course/view.php?id=4188 +aburaia,WS2016,BMR5_PRAK_2016,BMR5_Berufspraktikum_2016,https://moodle.technikum-wien.at/course/view.php?id=3746 +aburaia,WS2016,BMR-VZ-3-WS2016-PJM,Projektmanagement,https://moodle.technikum-wien.at/course/view.php?id=3452 +aburaia,WS2016,MMR-3-WS2016_PROJ,MMR-3-WS2016 - Projekt,https://moodle.technikum-wien.at/course/view.php?id=3351 +aburaia,WS2016,MMR-BB-1-WS2016-BMECH,Mechatronik 1,https://moodle.technikum-wien.at/course/view.php?id=4038 +aburaia,WS2016,MMR-VZ-1-WS2016-VMECH,Mechatronik 1,https://moodle.technikum-wien.at/course/view.php?id=4037 +aburaia,WS2016,MMR-VZ-4-WS2016-MT,Master Thesis,https://moodle.technikum-wien.at/course/view.php?id=3956 +aburaia,WS2016,MMR-VZB-3-WS2016-PRJ,Projekt,https://moodle.technikum-wien.at/course/view.php?id=3643 +adams,SS2016,BEW-BB-4-SS2016-ENG/67791,Business English 2,https://moodle.technikum-wien.at/course/view.php?id=3034 +adams,SS2016,BEW-DL-2-SS2016-ENG,Technical and Creative Communication,https://moodle.technikum-wien.at/course/view.php?id=2873 +adams,SS2016,BEW-DL-4-SS2016-DLPS,Business Communication for Engineers,https://moodle.technikum-wien.at/course/view.php?id=2883 +adams,SS2016,BEW-DL-6-SS2016-ADC,Advanced Communication,https://moodle.technikum-wien.at/course/view.php?id=2897 +adams,SS2016,BIC-BB-2-SS2016-ENG/68928/68931,Technical and Creative Communication,https://moodle.technikum-wien.at/course/view.php?id=2898 +adams,SS2016,BIW-BB-2-SS2016-PTC/67947,BIW-BB-2-SS2016 - Professional & Technical Communication 2,https://moodle.technikum-wien.at/course/view.php?id=3020 +adams,SS2016,BWI-DL-4-SS2016-BUCdl,Business Communication,https://moodle.technikum-wien.at/course/view.php?id=2879 +adams,SS2016,EWU-VZ-1-SS2016-WUE1,Warm-up Englisch 1,https://moodle.technikum-wien.at/course/view.php?id=3415 +adams,SS2016,MGR-VZ-4-SS2016-ENG/67338,Intensiv Englisch,https://moodle.technikum-wien.at/course/view.php?id=3174 +adams,WS2016,BEW-DL-3-WS2016-DLGI,General Information,https://moodle.technikum-wien.at/course/view.php?id=3481 +adams,WS2016,BEW-DL-3-WS2016-EC,Economics Technology and Society,https://moodle.technikum-wien.at/course/view.php?id=3414 +adams,WS2016,BIC-BB-1-WS2016-PSC/70705/70740,Professional and Social Communication,https://moodle.technikum-wien.at/course/view.php?id=3559 +adams,WS2016,BIW-BB-1-WS2016-PTC/73126,BIW-BB-1-WS2016 - Professional and Technical Communication 1,https://moodle.technikum-wien.at/course/view.php?id=3403 +adams,WS2016,BIW-BB-3-WS2016-EBE/72699,English for Business and Engineering,https://moodle.technikum-wien.at/course/view.php?id=3938 +adams,WS2016,BSA-VZ-1-WS2016-PSC,Professional and Social Communication,https://moodle.technikum-wien.at/course/view.php?id=3747 +adams,WS2016,BSA-VZ-3-WS2016-TCC,Technical and Creative Communication ,https://moodle.technikum-wien.at/course/view.php?id=3748 +adams,WS2016,BWI-DL-3-WS2016-ENGdl,Econonmics Technology and Society,https://moodle.technikum-wien.at/course/view.php?id=3608 +adensam,SS2016,MEE-BB-2-SS2016-BEV,Bewertungsverfahren,https://moodle.technikum-wien.at/course/view.php?id=2955 +adensam,WS2016,MEE-BB-3-WS2016-ERT,Energierecht,https://moodle.technikum-wien.at/course/view.php?id=3964 +adensam,WS2016,MEE-BB-3-WS2016-EWT,Energiewirtschaft,https://moodle.technikum-wien.at/course/view.php?id=3794 +adensam,WS2016,MUT-BB-3-WS2016-EM,Energiemanagement,https://moodle.technikum-wien.at/course/view.php?id=3676 +kraft,WS2016,MWI-DL-3-WS2016-MBdl,Mobile Business,https://moodle.technikum-wien.at/course/view.php?id=3589 +kraft,WS2016,MWI-PT-1-WS2016-ITSCpt,IT Strategy and IT Controlling,https://moodle.technikum-wien.at/course/view.php?id=3560 +kraft,WS2016,MWI-PT-3-WS2016-MBpt,Mobile Business,https://moodle.technikum-wien.at/course/view.php?id=3590 +kralc,SS2016,MEE-BB-2-SS2020-AS Anlagentechnik und Simulation (mit Modelica und Dymola),Anlagentechnik und Simulation mit Modelica und Dymola,https://moodle.technikum-wien.at/course/view.php?id=3025 +krametz,WS2016,WS2016-BEE3-ALB,WS2016-BEE3-ALB,https://moodle.technikum-wien.at/course/view.php?id=3624 +kratochv,SS2016,BST-VZ-2-SS2016-MTL,Materialtechnologie - Labor I,https://moodle.technikum-wien.at/course/view.php?id=3332 +kravtche,WS2016,BEW-BB-1-WS2016-LAB,Labor 1,https://moodle.technikum-wien.at/course/view.php?id=3734 +krenn,SS2016,BEW-DL-2-SS2016-PHY/67684,Physics 1,https://moodle.technikum-wien.at/course/view.php?id=2862 +krenn,WS2016,BEW-BB-5-WS2016-WIA,Wissenschaftliches Arbeiten,https://moodle.technikum-wien.at/course/view.php?id=3716 +krenn,WS2016,BEW-DL-3-WS2016-DLGI,General Information,https://moodle.technikum-wien.at/course/view.php?id=3481 +krenn,WS2016,BEW-DL-3-WS2016-PHY,Physics 2,https://moodle.technikum-wien.at/course/view.php?id=3378 +krennk,WS2016,BST-VZ-5-WS2016-BA1-MBAP3,Bachelorarbeit 1 - MBA Projekt 3 ,https://moodle.technikum-wien.at/course/view.php?id=3527 +krennm,SS2016,BBE-VZ-4-SS2016-CSA,Circuitdesign and Signal Analysis,https://moodle.technikum-wien.at/course/view.php?id=2956 +krizek,SS2016,BVU-VZ-6-SS2016-PSB,Praxissemesterbegleitung,https://moodle.technikum-wien.at/course/view.php?id=3157 +krizek,SS2016,MIT-VZ-2-SS2016-ITS PRJ I,ITS Project I,https://moodle.technikum-wien.at/course/view.php?id=3175 +krizek,WS2016,MSC-VZ-3-WS2016-IP2,ITS Project II,https://moodle.technikum-wien.at/course/view.php?id=3713 diff --git a/application/tmp/inputFileMitError.csv b/application/tmp/inputFileMitError.csv new file mode 100644 index 000000000..26c53a78d --- /dev/null +++ b/application/tmp/inputFileMitError.csv @@ -0,0 +1,11 @@ +uid,studiensemester,moodle_course_shortname,moodle_course_fullname,moodle_course_url +aburaia,SS2016,BMR4_MLAB2_2016,BMR4_Mechatronics-Lab2_2016,https://moodle.technikum-wien.at/course/view.php?id=2948 +aburaia,WS2016,MMR-VZB-3-WS2016-PRJ,,https://moodle.technikum-wien.at/course/view.php?id=3643 +adams,SS2016,BEW-BB-4-SS2016-ENG/67791,Business English 2,https://moodle.technikum-wien.at/course/view.php?id=3034 +adams,SS2016,,Technical and Creative Communication,https://moodle.technikum-wien.at/course/view.php?id=2873 +krizek,SS2016,BVU-VZ-6-SS2016-PSB,Praxissemesterbegleitung, +krizek,SS2016,MIT-VZ-2-SS2016-ITS PRJ I,ITS Project I,https://moodle.technikum-wien.at/course/view.php?id=3175 +krizek,WS2016,MSC-VZ-3-WS2016-IP2,ITS Project II,https://moodle.technikum-wien.at/course/view.php?id=3713 +kraft,WS2016,MWI-DL-3-WS2016-MBdl,Mobile Business,https://moodle.technikum-wien.at/course/view.php?id=3589 +kraft,,MWI-PT-1-WS2016-ITSCpt,IT Strategy and IT Controlling,https://moodle.technikum-wien.at/course/view.php?id=3560 +kraft,WS2016,MWI-PT-3-WS2016-MBpt,Mobile Business,https://moodle.technikum-wien.at/course/view.php?id=3590 diff --git a/application/tmp/inputFileUltra.csv b/application/tmp/inputFileUltra.csv new file mode 100644 index 000000000..927dc0062 --- /dev/null +++ b/application/tmp/inputFileUltra.csv @@ -0,0 +1,8 @@ +uid,studiensemester,moodle_course_shortname,moodle_course_fullname,moodle_course_url +aburaia,SS2016,BMR4_MLAB2_2016,BMR4_Mechatronics-Lab2_2016,https://moodle.technikum-wien.at/course/view.php?id=2948 +aburaia,WS2016,MMR-VZB-3-WS2016-PRJ,Projekt,https://moodle.technikum-wien.at/course/view.php?id=3643 +adams,SS2016,BEW-BB-4-SS2016-ENG/67791,Business English 2,https://moodle.technikum-wien.at/course/view.php?id=3034 +adams,SS2016,BEW-DL-2-SS2016-ENG,Technical and Creative Communication,https://moodle.technikum-wien.at/course/view.php?id=2873 +krizek,SS2016,BVU-VZ-6-SS2016-PSB,Praxissemesterbegleitung,https://moodle.technikum-wien.at/course/view.php?id=3157 +krizek,SS2016,MIT-VZ-2-SS2016-ITS PRJ I,ITS Project I,https://moodle.technikum-wien.at/course/view.php?id=3175 +krizek,WS2016,MSC-VZ-3-WS2016-IP2,ITS Project II,https://moodle.technikum-wien.at/course/view.php?id=3713 diff --git a/cis/private/lehre/notenliste.xls.php b/cis/private/lehre/notenliste.xls.php index 42dcc8418..2e0403139 100644 --- a/cis/private/lehre/notenliste.xls.php +++ b/cis/private/lehre/notenliste.xls.php @@ -270,17 +270,18 @@ else AND tbl_zeugnisnote.student_uid=tbl_student.student_uid AND tbl_zeugnisnote.studiensemester_kurzbz=tbl_studentlehrverband.studiensemester_kurzbz) LEFT JOIN bis.tbl_bisio ON(uid=tbl_bisio.student_uid) - LEFT JOIN bis.tbl_mobilitaet USING(prestudent_id) + LEFT JOIN bis.tbl_mobilitaet ON (bis.tbl_mobilitaet.prestudent_id = public.tbl_student.prestudent_id) LEFT JOIN lehre.tbl_note USING(note) WHERE vw_student_lehrveranstaltung.lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER)." - AND vw_student_lehrveranstaltung.studiensemester_kurzbz=".$db->db_add_param($stsem);";"; + AND vw_student_lehrveranstaltung.studiensemester_kurzbz=".$db->db_add_param($stsem);";"; if($lehreinheit_id!='') $qry.=" AND vw_student_lehrveranstaltung.lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER); $qry.=' ORDER BY nachname, vorname, person_id, tbl_bisio.bis, doubledegree DESC'; + if($result = $db->db_query($qry)) { $i=1; @@ -338,7 +339,7 @@ else $worksheet->write($lines,9, date('d.m.Y', strtotime($resultPr->datum)), $format_highlightright_date); $worksheet->write($lines,10, $resultPr->note, $format_highlightright); } - else + else { $worksheet->write($lines,9, '', $format_highlightright_date); $worksheet->write($lines,10, '', $format_highlightright); From c086eddfaecccaf40c3dc055f56f4a7f0ed1905e Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 8 May 2023 14:18:07 +0200 Subject: [PATCH 022/221] update Abfrage, delete testfiles --- application/inputFileTest.csv | 8 ----- application/tmp/inputFile.csv | 49 --------------------------- application/tmp/inputFileMitError.csv | 11 ------ application/tmp/inputFileUltra.csv | 8 ----- 4 files changed, 76 deletions(-) delete mode 100644 application/inputFileTest.csv delete mode 100644 application/tmp/inputFile.csv delete mode 100644 application/tmp/inputFileMitError.csv delete mode 100644 application/tmp/inputFileUltra.csv diff --git a/application/inputFileTest.csv b/application/inputFileTest.csv deleted file mode 100644 index 927dc0062..000000000 --- a/application/inputFileTest.csv +++ /dev/null @@ -1,8 +0,0 @@ -uid,studiensemester,moodle_course_shortname,moodle_course_fullname,moodle_course_url -aburaia,SS2016,BMR4_MLAB2_2016,BMR4_Mechatronics-Lab2_2016,https://moodle.technikum-wien.at/course/view.php?id=2948 -aburaia,WS2016,MMR-VZB-3-WS2016-PRJ,Projekt,https://moodle.technikum-wien.at/course/view.php?id=3643 -adams,SS2016,BEW-BB-4-SS2016-ENG/67791,Business English 2,https://moodle.technikum-wien.at/course/view.php?id=3034 -adams,SS2016,BEW-DL-2-SS2016-ENG,Technical and Creative Communication,https://moodle.technikum-wien.at/course/view.php?id=2873 -krizek,SS2016,BVU-VZ-6-SS2016-PSB,Praxissemesterbegleitung,https://moodle.technikum-wien.at/course/view.php?id=3157 -krizek,SS2016,MIT-VZ-2-SS2016-ITS PRJ I,ITS Project I,https://moodle.technikum-wien.at/course/view.php?id=3175 -krizek,WS2016,MSC-VZ-3-WS2016-IP2,ITS Project II,https://moodle.technikum-wien.at/course/view.php?id=3713 diff --git a/application/tmp/inputFile.csv b/application/tmp/inputFile.csv deleted file mode 100644 index 48411ca1a..000000000 --- a/application/tmp/inputFile.csv +++ /dev/null @@ -1,49 +0,0 @@ -uid,studiensemester,moodle_course_shortname,moodle_course_fullname,moodle_course_url -aburaia,SS2016,BMR4_MLAB2_2016,BMR4_Mechatronics-Lab2_2016,https://moodle.technikum-wien.at/course/view.php?id=2948 -aburaia,SS2016,BMR6_MES_2016,BMR6_Mechatronische-Systeme_2016,https://moodle.technikum-wien.at/course/view.php?id=2951 -aburaia,SS2016,BMR-VZ-6-SS2016-EMS,Entwurf mechatronischer Systeme,https://moodle.technikum-wien.at/course/view.php?id=2833 -aburaia,WS2016,BMB-VZ-5-WS2016-DF,Industrierobotik in der Digitalen Fabrik,https://moodle.technikum-wien.at/course/view.php?id=4188 -aburaia,WS2016,BMR5_PRAK_2016,BMR5_Berufspraktikum_2016,https://moodle.technikum-wien.at/course/view.php?id=3746 -aburaia,WS2016,BMR-VZ-3-WS2016-PJM,Projektmanagement,https://moodle.technikum-wien.at/course/view.php?id=3452 -aburaia,WS2016,MMR-3-WS2016_PROJ,MMR-3-WS2016 - Projekt,https://moodle.technikum-wien.at/course/view.php?id=3351 -aburaia,WS2016,MMR-BB-1-WS2016-BMECH,Mechatronik 1,https://moodle.technikum-wien.at/course/view.php?id=4038 -aburaia,WS2016,MMR-VZ-1-WS2016-VMECH,Mechatronik 1,https://moodle.technikum-wien.at/course/view.php?id=4037 -aburaia,WS2016,MMR-VZ-4-WS2016-MT,Master Thesis,https://moodle.technikum-wien.at/course/view.php?id=3956 -aburaia,WS2016,MMR-VZB-3-WS2016-PRJ,Projekt,https://moodle.technikum-wien.at/course/view.php?id=3643 -adams,SS2016,BEW-BB-4-SS2016-ENG/67791,Business English 2,https://moodle.technikum-wien.at/course/view.php?id=3034 -adams,SS2016,BEW-DL-2-SS2016-ENG,Technical and Creative Communication,https://moodle.technikum-wien.at/course/view.php?id=2873 -adams,SS2016,BEW-DL-4-SS2016-DLPS,Business Communication for Engineers,https://moodle.technikum-wien.at/course/view.php?id=2883 -adams,SS2016,BEW-DL-6-SS2016-ADC,Advanced Communication,https://moodle.technikum-wien.at/course/view.php?id=2897 -adams,SS2016,BIC-BB-2-SS2016-ENG/68928/68931,Technical and Creative Communication,https://moodle.technikum-wien.at/course/view.php?id=2898 -adams,SS2016,BIW-BB-2-SS2016-PTC/67947,BIW-BB-2-SS2016 - Professional & Technical Communication 2,https://moodle.technikum-wien.at/course/view.php?id=3020 -adams,SS2016,BWI-DL-4-SS2016-BUCdl,Business Communication,https://moodle.technikum-wien.at/course/view.php?id=2879 -adams,SS2016,EWU-VZ-1-SS2016-WUE1,Warm-up Englisch 1,https://moodle.technikum-wien.at/course/view.php?id=3415 -adams,SS2016,MGR-VZ-4-SS2016-ENG/67338,Intensiv Englisch,https://moodle.technikum-wien.at/course/view.php?id=3174 -adams,WS2016,BEW-DL-3-WS2016-DLGI,General Information,https://moodle.technikum-wien.at/course/view.php?id=3481 -adams,WS2016,BEW-DL-3-WS2016-EC,Economics Technology and Society,https://moodle.technikum-wien.at/course/view.php?id=3414 -adams,WS2016,BIC-BB-1-WS2016-PSC/70705/70740,Professional and Social Communication,https://moodle.technikum-wien.at/course/view.php?id=3559 -adams,WS2016,BIW-BB-1-WS2016-PTC/73126,BIW-BB-1-WS2016 - Professional and Technical Communication 1,https://moodle.technikum-wien.at/course/view.php?id=3403 -adams,WS2016,BIW-BB-3-WS2016-EBE/72699,English for Business and Engineering,https://moodle.technikum-wien.at/course/view.php?id=3938 -adams,WS2016,BSA-VZ-1-WS2016-PSC,Professional and Social Communication,https://moodle.technikum-wien.at/course/view.php?id=3747 -adams,WS2016,BSA-VZ-3-WS2016-TCC,Technical and Creative Communication ,https://moodle.technikum-wien.at/course/view.php?id=3748 -adams,WS2016,BWI-DL-3-WS2016-ENGdl,Econonmics Technology and Society,https://moodle.technikum-wien.at/course/view.php?id=3608 -adensam,SS2016,MEE-BB-2-SS2016-BEV,Bewertungsverfahren,https://moodle.technikum-wien.at/course/view.php?id=2955 -adensam,WS2016,MEE-BB-3-WS2016-ERT,Energierecht,https://moodle.technikum-wien.at/course/view.php?id=3964 -adensam,WS2016,MEE-BB-3-WS2016-EWT,Energiewirtschaft,https://moodle.technikum-wien.at/course/view.php?id=3794 -adensam,WS2016,MUT-BB-3-WS2016-EM,Energiemanagement,https://moodle.technikum-wien.at/course/view.php?id=3676 -kraft,WS2016,MWI-DL-3-WS2016-MBdl,Mobile Business,https://moodle.technikum-wien.at/course/view.php?id=3589 -kraft,WS2016,MWI-PT-1-WS2016-ITSCpt,IT Strategy and IT Controlling,https://moodle.technikum-wien.at/course/view.php?id=3560 -kraft,WS2016,MWI-PT-3-WS2016-MBpt,Mobile Business,https://moodle.technikum-wien.at/course/view.php?id=3590 -kralc,SS2016,MEE-BB-2-SS2020-AS Anlagentechnik und Simulation (mit Modelica und Dymola),Anlagentechnik und Simulation mit Modelica und Dymola,https://moodle.technikum-wien.at/course/view.php?id=3025 -krametz,WS2016,WS2016-BEE3-ALB,WS2016-BEE3-ALB,https://moodle.technikum-wien.at/course/view.php?id=3624 -kratochv,SS2016,BST-VZ-2-SS2016-MTL,Materialtechnologie - Labor I,https://moodle.technikum-wien.at/course/view.php?id=3332 -kravtche,WS2016,BEW-BB-1-WS2016-LAB,Labor 1,https://moodle.technikum-wien.at/course/view.php?id=3734 -krenn,SS2016,BEW-DL-2-SS2016-PHY/67684,Physics 1,https://moodle.technikum-wien.at/course/view.php?id=2862 -krenn,WS2016,BEW-BB-5-WS2016-WIA,Wissenschaftliches Arbeiten,https://moodle.technikum-wien.at/course/view.php?id=3716 -krenn,WS2016,BEW-DL-3-WS2016-DLGI,General Information,https://moodle.technikum-wien.at/course/view.php?id=3481 -krenn,WS2016,BEW-DL-3-WS2016-PHY,Physics 2,https://moodle.technikum-wien.at/course/view.php?id=3378 -krennk,WS2016,BST-VZ-5-WS2016-BA1-MBAP3,Bachelorarbeit 1 - MBA Projekt 3 ,https://moodle.technikum-wien.at/course/view.php?id=3527 -krennm,SS2016,BBE-VZ-4-SS2016-CSA,Circuitdesign and Signal Analysis,https://moodle.technikum-wien.at/course/view.php?id=2956 -krizek,SS2016,BVU-VZ-6-SS2016-PSB,Praxissemesterbegleitung,https://moodle.technikum-wien.at/course/view.php?id=3157 -krizek,SS2016,MIT-VZ-2-SS2016-ITS PRJ I,ITS Project I,https://moodle.technikum-wien.at/course/view.php?id=3175 -krizek,WS2016,MSC-VZ-3-WS2016-IP2,ITS Project II,https://moodle.technikum-wien.at/course/view.php?id=3713 diff --git a/application/tmp/inputFileMitError.csv b/application/tmp/inputFileMitError.csv deleted file mode 100644 index 26c53a78d..000000000 --- a/application/tmp/inputFileMitError.csv +++ /dev/null @@ -1,11 +0,0 @@ -uid,studiensemester,moodle_course_shortname,moodle_course_fullname,moodle_course_url -aburaia,SS2016,BMR4_MLAB2_2016,BMR4_Mechatronics-Lab2_2016,https://moodle.technikum-wien.at/course/view.php?id=2948 -aburaia,WS2016,MMR-VZB-3-WS2016-PRJ,,https://moodle.technikum-wien.at/course/view.php?id=3643 -adams,SS2016,BEW-BB-4-SS2016-ENG/67791,Business English 2,https://moodle.technikum-wien.at/course/view.php?id=3034 -adams,SS2016,,Technical and Creative Communication,https://moodle.technikum-wien.at/course/view.php?id=2873 -krizek,SS2016,BVU-VZ-6-SS2016-PSB,Praxissemesterbegleitung, -krizek,SS2016,MIT-VZ-2-SS2016-ITS PRJ I,ITS Project I,https://moodle.technikum-wien.at/course/view.php?id=3175 -krizek,WS2016,MSC-VZ-3-WS2016-IP2,ITS Project II,https://moodle.technikum-wien.at/course/view.php?id=3713 -kraft,WS2016,MWI-DL-3-WS2016-MBdl,Mobile Business,https://moodle.technikum-wien.at/course/view.php?id=3589 -kraft,,MWI-PT-1-WS2016-ITSCpt,IT Strategy and IT Controlling,https://moodle.technikum-wien.at/course/view.php?id=3560 -kraft,WS2016,MWI-PT-3-WS2016-MBpt,Mobile Business,https://moodle.technikum-wien.at/course/view.php?id=3590 diff --git a/application/tmp/inputFileUltra.csv b/application/tmp/inputFileUltra.csv deleted file mode 100644 index 927dc0062..000000000 --- a/application/tmp/inputFileUltra.csv +++ /dev/null @@ -1,8 +0,0 @@ -uid,studiensemester,moodle_course_shortname,moodle_course_fullname,moodle_course_url -aburaia,SS2016,BMR4_MLAB2_2016,BMR4_Mechatronics-Lab2_2016,https://moodle.technikum-wien.at/course/view.php?id=2948 -aburaia,WS2016,MMR-VZB-3-WS2016-PRJ,Projekt,https://moodle.technikum-wien.at/course/view.php?id=3643 -adams,SS2016,BEW-BB-4-SS2016-ENG/67791,Business English 2,https://moodle.technikum-wien.at/course/view.php?id=3034 -adams,SS2016,BEW-DL-2-SS2016-ENG,Technical and Creative Communication,https://moodle.technikum-wien.at/course/view.php?id=2873 -krizek,SS2016,BVU-VZ-6-SS2016-PSB,Praxissemesterbegleitung,https://moodle.technikum-wien.at/course/view.php?id=3157 -krizek,SS2016,MIT-VZ-2-SS2016-ITS PRJ I,ITS Project I,https://moodle.technikum-wien.at/course/view.php?id=3175 -krizek,WS2016,MSC-VZ-3-WS2016-IP2,ITS Project II,https://moodle.technikum-wien.at/course/view.php?id=3713 From 2b363119c543e2c81d6cf2c3d2035b75e95ebcd9 Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Tue, 16 May 2023 10:33:05 +0200 Subject: [PATCH 023/221] Split the component to improve the quality, readability and maintainability --- public/js/components/filter/Filter.js | 394 +++++--------------------- 1 file changed, 71 insertions(+), 323 deletions(-) diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index 2bf878e5a..dbf15a315 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -18,6 +18,8 @@ import {CoreFilterAPIs} from './API.js'; import {CoreRESTClient} from '../../RESTClient.js'; import {CoreFetchCmpt} from '../../components/Fetch.js'; +import FilterConfig from './Filter/Config.js'; +import FilterColumns from './Filter/Columns.js'; // const FILTER_COMPONENT_NEW_FILTER = 'Filter Component New Filter'; @@ -29,10 +31,14 @@ var _uuid = 0; * */ export const CoreFilterCmpt = { - emits: ['nwNewEntry'], components: { - CoreFetchCmpt + CoreFetchCmpt, + FilterConfig, + FilterColumns }, + emits: [ + 'nwNewEntry' + ], props: { title: String, sideMenu: { @@ -135,20 +141,17 @@ export const CoreFilterCmpt = { if (!this.uuid) return ''; return '-' + this.uuid; + }, + columnsForFilter() { + if (!this.filteredColumns || !this.datasetMetadata) + return []; + const filterTitles = this.filteredColumns.reduce((a,c) => { + a[c.field] = c.title; + return a; + }, {}); + return this.datasetMetadata.map(el => ({...el, ...{title: filterTitles[el.name]}})); } }, - beforeCreate() { - if (!this.tableOnly == !this.filterType) - alert('You can not have a filter-type in table-only mode!'); - }, - created() { - this.uuid = _uuid++; - if (!this.tableOnly) - this.getFilter(); // get the filter data - }, - mounted() { - this.initTabulator(); - }, methods: { initTabulator() { // Define a default tabulator options in case it was not provided @@ -230,7 +233,7 @@ export const CoreFilterCmpt = { filter.type = data.datasetMetadata[i].type; this.filterFields.push(filter); - break; + //break; } } } @@ -266,6 +269,7 @@ export const CoreFilterCmpt = { if (link == null) link = '#'; filtersArray[filtersArray.length] = { + id: filters[filtersCount].filter_id, link: link + filters[filtersCount].filter_id, description: filters[filtersCount].desc, sort: filtersCount, @@ -280,6 +284,7 @@ export const CoreFilterCmpt = { if (link == null) link = '#'; filtersArray[filtersArray.length] = { + id: personalFilters[filtersCount].filter_id, link: link + personalFilters[filtersCount].filter_id, description: personalFilters[filtersCount].desc, subscriptDescription: personalFilters[filtersCount].subscriptDescription, @@ -318,6 +323,7 @@ export const CoreFilterCmpt = { if (link == null) link = '#'; filtersArray[filtersArray.length] = { + id: filters[filtersCount].filter_id, option: filters[filtersCount].filter_id, description: filters[filtersCount].desc }; @@ -330,6 +336,7 @@ export const CoreFilterCmpt = { if (link == null) link = '#'; filtersArray[filtersArray.length] = { + id: personalFilters[filtersCount].filter_id, option: personalFilters[filtersCount].filter_id, description: personalFilters[filtersCount].desc }; @@ -366,12 +373,12 @@ export const CoreFilterCmpt = { /** * */ - handlerSaveCustomFilter: function(event) { + handlerSaveCustomFilter: function(customFilterName) { // this.startFetchCmpt( CoreFilterAPIs.saveCustomFilter, { - customFilterName: this.$refscustomFilterName.value + customFilterName }, this.getFilter ); @@ -389,150 +396,10 @@ export const CoreFilterCmpt = { this.getFilter ); }, - /** - * - */ - handlerApplyFilterFields: function(event) { - let filterFields = []; - let filterFieldDivRows = document.getElementById('filterFields').getElementsByClassName('row'); - for (let i = 0; i< filterFieldDivRows.length; i++) - { - let filterField = {}; - - for (let j = 0; j< filterFieldDivRows[i].children.length; j++) - { - let filterColumn = filterFieldDivRows[i].children[j]; - let filterColumnElement = filterColumn.children[0]; - - // If the first column then search for the fields dropdown - if (j == 0) filterColumnElement = filterColumnElement.querySelector('select[name=fieldName]'); - - // If the filter name is _not_ null and it is _not_ a new filter - if (filterColumnElement.name != null && filterColumnElement.name != FILTER_COMPONENT_NEW_FILTER) - { - // Condition - if (filterColumnElement.name == 'condition' && filterColumnElement.value == "") - { - alert("Please fill all the filter options"); - return; - } - - // Name - if (filterColumnElement.name == 'fieldName') - { - filterField.name = filterColumnElement.value; - } - // Operation - if (filterColumnElement.name == 'operation') - { - filterField.operation = filterColumnElement.value; - } - // Condition - if (filterColumnElement.name == 'condition') - { - filterField.condition = filterColumnElement.value; - } - // Option - if (filterColumnElement.name == 'option') - { - filterField.option = filterColumnElement.value; - } - } - } - - if (Object.entries(filterField).length > 0) filterFields.push(filterField); - } - - // - this.startFetchCmpt( - CoreFilterAPIs.applyFilterFields, - { - filterFields: filterFields - }, - this.getFilter - ); - }, - /** - * - */ - handlerChangeFilterField: function(oldValue, newValue) { - - // If an old filter has been changed - if (oldValue != "") - { - for (let i = 0; i < this.filterFields.length; i++) - { - if (this.filterFields[i].name == oldValue) - { - this.filterFields.splice(i, 1); - break; - } - } - } - - // Then add the new filter - for (let i = 0; i < this.datasetMetadata.length; i++) - { - if (this.datasetMetadata[i].name == newValue) - { - let filter = { - name: this.datasetMetadata[i].name, - type: this.datasetMetadata[i].type - }; - - this.filterFields.push(filter); - break; - } - } - }, - /** - * - */ - handlerAddNewFilter: function(event) { - // Adds a new empty filter - this.filterFields.push({ - name: FILTER_COMPONENT_NEW_FILTER, - type: FILTER_COMPONENT_NEW_FILTER_TYPE - }); - }, /* * */ - handlerToggleSelectedField(field) { - - // If it is a selected field - if (this.selectedFields.indexOf(field) != -1) - { - // then hide it - this.tabulator.hideColumn(field); - // and remove it from the this.selectedFields property - this.selectedFields.splice(this.selectedFields.indexOf(field), 1); - } - else // otherwise - { - // show it - this.tabulator.showColumn(field); - // and add it to the this.selectedFields property - this.selectedFields.push(field); - } - }, - /** - * - */ - handlerRemoveFilterField: function(event) { - // - this.startFetchCmpt( - CoreFilterAPIs.removeFilterField, - { - filterField: event.currentTarget.getAttribute('field-to-remove') - }, - this.getFilter - ); - }, - /** - * - */ handlerGetFilterById: function(event) { let filterId = null; @@ -550,16 +417,40 @@ export const CoreFilterCmpt = { filterId = attr.substring(1); } + this.switchFilter(filterId); + }, + switchFilter(filterId) { // Ajax call this.startFetchCmpt( CoreFilterAPIs.getFilterById, { - filterId: filterId + filterId }, this.render ); + }, + applyFilterConfig(filterFields) { + this.startFetchCmpt( + CoreFilterAPIs.applyFilterFields, + { + filterFields + }, + this.getFilter + ); } }, + beforeCreate() { + if (!this.tableOnly == !this.filterType) + alert('You can not have a filter-type in table-only mode!'); + }, + created() { + this.uuid = _uuid++; + if (!this.tableOnly) + this.getFilter(); // get the filter data + }, + mounted() { + this.initTabulator(); + }, template: `
-
-
- -
-
- -
-
-
-
+ -
-
- -
- -
-
-
- - Neuer Filter - - - - -
-
- -
- - -
-
-
- - -
-
-
- -
-
-
-
-
+ From 1568e619a585d5cb7dbf3ad7d3c2c96b8c6101b7 Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Tue, 16 May 2023 10:33:31 +0200 Subject: [PATCH 024/221] Split the component to improve the quality, readability and maintainability --- public/js/components/filter/Filter/Columns.js | 83 +++++++ public/js/components/filter/Filter/Config.js | 215 ++++++++++++++++++ 2 files changed, 298 insertions(+) create mode 100644 public/js/components/filter/Filter/Columns.js create mode 100644 public/js/components/filter/Filter/Config.js diff --git a/public/js/components/filter/Filter/Columns.js b/public/js/components/filter/Filter/Columns.js new file mode 100644 index 000000000..448d05d17 --- /dev/null +++ b/public/js/components/filter/Filter/Columns.js @@ -0,0 +1,83 @@ +/** + * Copyright (C) 2022 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * + */ +export default { + props: { + fields: Array, + selected: { + type: Array, + default: [] + }, + names: { + type: Array, + default: [] + } + }, + emits: [ + 'hide', + 'show' + ], + data: function() { + return { + selectedFields: [] + }; + }, + computed: { + + }, + watch: { + selected(n) { + this.selectedFields = n; + } + }, + methods: { + toggle(field) { + if (this.selectedFields.indexOf(field) != -1) + { + this.selectedFields.splice(this.selectedFields.indexOf(field), 1); + this.$emit('hide', field); + } + else + { + this.selectedFields.push(field); + this.$emit('show', field); + } + } + }, + template: ` +
+
+
+
+
+ {{ names[fieldToDisplay] || fieldToDisplay }} +
+
+
+
+
+ ` +}; + diff --git a/public/js/components/filter/Filter/Config.js b/public/js/components/filter/Filter/Config.js new file mode 100644 index 000000000..6869c1599 --- /dev/null +++ b/public/js/components/filter/Filter/Config.js @@ -0,0 +1,215 @@ +/** + * Copyright (C) 2022 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +const FILTER_COMPONENT_NEW_FILTER = 'Filter Component New Filter'; + +/** + * + */ +export default { + props: { + filters: { + type: Array, + default: [] + }, + columns: { + type: Array, + default: [] + }, + fields: { + type: Array, + default: [] + } + }, + emits: [ + 'switchFilter', + 'applyFilterConfig', + 'saveCustomFilter' + ], + data: function() { + return { + currentFields: [] + }; + }, + computed: { + types() { + return this.columns.reduce((a,c) => { + let type = c.type.toLowerCase(); + if (type.indexOf('int') >= 0) + a[c.name] = 'Numeric'; + else if ( + type.indexOf('varchar') >= 0 || + type.indexOf('text') >= 0 || + type.indexOf('bpchar') >= 0 + ) + a[c.name] = 'Text'; + else if ( + type.indexOf('timestamp') >= 0 || + type.indexOf('date') >= 0 + ) + a[c.name] = 'Date'; + else + a[c.name] = ''; + return a; + }, {}); + } + }, + watch: { + fields(n) { + this.currentFields = n; + } + }, + methods: { + switchFilter(evt) { + this.$emit('switchFilter', evt.currentTarget.value); + }, + applyFilterConfig() { + const filteredFields = this.currentFields.filter(el => el.name != FILTER_COMPONENT_NEW_FILTER); + if (filteredFields.filter(el => el.condition == "").length) + alert("Please fill all the filter options"); + else + this.$emit('applyFilterConfig', filteredFields); + }, + addField(evt) { + this.currentFields.push({ + name: FILTER_COMPONENT_NEW_FILTER + }); + }, + removeField(index) { + this.currentFields.splice(index, 1); + } + }, + template: ` +
+
+
+
+ +
+
+ +
+
+
+ +
+
+ Filter {{ index + 1 }} + +
+
+ + + + + + + + + + +
+ +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+
+
+ ` +}; + From 38f2bb89a45a902d655971a3fec9ddaa3bb7e6cf Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Tue, 16 May 2023 10:40:58 +0200 Subject: [PATCH 025/221] readability --- public/js/components/filter/Filter/Columns.js | 8 ++++---- public/js/components/filter/Filter/Config.js | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/js/components/filter/Filter/Columns.js b/public/js/components/filter/Filter/Columns.js index 448d05d17..ca8fc0aec 100644 --- a/public/js/components/filter/Filter/Columns.js +++ b/public/js/components/filter/Filter/Columns.js @@ -30,10 +30,10 @@ export default { default: [] } }, - emits: [ - 'hide', - 'show' - ], + emits: { + hide: ['fieldName'], + show: ['fieldName'] + }, data: function() { return { selectedFields: [] diff --git a/public/js/components/filter/Filter/Config.js b/public/js/components/filter/Filter/Config.js index 6869c1599..3c75c5a3c 100644 --- a/public/js/components/filter/Filter/Config.js +++ b/public/js/components/filter/Filter/Config.js @@ -35,11 +35,11 @@ export default { default: [] } }, - emits: [ - 'switchFilter', - 'applyFilterConfig', - 'saveCustomFilter' - ], + emits: { + switchFilter: ['filterId'], + applyFilterConfig: ['filterFields'], + saveCustomFilter: ['customFilterName'] + }, data: function() { return { currentFields: [] From 76fd4250275887e9378dc7cd952721a654d209d1 Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Tue, 16 May 2023 14:12:46 +0200 Subject: [PATCH 026/221] assert valid nw-new-entry listener if side-menu is enabled --- public/js/components/filter/Filter.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index dbf15a315..eb5f1a005 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -40,6 +40,7 @@ export const CoreFilterCmpt = { 'nwNewEntry' ], props: { + onNwNewEntry: Function, // NOTE(chris): Hack to get the nwNewEntry listener into $props title: String, sideMenu: { type: Boolean, @@ -444,6 +445,8 @@ export const CoreFilterCmpt = { alert('You can not have a filter-type in table-only mode!'); }, created() { + if (this.sideMenu && (!this.$props.onNwNewEntry || !(this.$props.onNwNewEntry instanceof Function))) + alert('"nwNewEntry" listener is mandatory when sideMenu is true'); this.uuid = _uuid++; if (!this.tableOnly) this.getFilter(); // get the filter data @@ -451,7 +454,7 @@ export const CoreFilterCmpt = { mounted() { this.initTabulator(); }, - template: ` + template: `{{$attrs}} Date: Wed, 17 May 2023 08:41:04 +0200 Subject: [PATCH 027/221] - details bei abgewiesenen --- .../controllers/system/infocenter/InfoCenter.php | 11 +++++++++-- .../system/infocenter/infocenterAbgewiesenData.php | 11 +++++++++++ .../views/system/infocenter/infocenterDetails.php | 3 ++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 548b071d3..1e6639d25 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -314,7 +314,7 @@ class InfoCenter extends Auth_Controller show_error('Person does not exist!'); $origin_page = $this->input->get(self::ORIGIN_PAGE); - if ($origin_page == self::INDEX_PAGE) + if (in_array($origin_page, array(self::INDEX_PAGE, self::ABGEWIESEN_PAGE))) { // mark person as locked for editing $result = $this->PersonLockModel->lockPerson($person_id, $this->_uid, self::APP); @@ -359,7 +359,14 @@ class InfoCenter extends Auth_Controller if (isError($result)) show_error(getError($result)); - $redirectLink = '/'.self::INFOCENTER_URI.'?'.self::FHC_CONTROLLER_ID.'='.$this->getControllerId(); + $origin_page = $this->input->get(self::ORIGIN_PAGE); + + if ($origin_page === self::ABGEWIESEN_PAGE) + $redirectLink = self::INFOCENTER_URI. '/' .self::ABGEWIESEN_PAGE; + else + $redirectLink = '/'.self::INFOCENTER_URI; + + $redirectLink .= '?'.self::FHC_CONTROLLER_ID.'='.$this->getControllerId(); // Force reload of Dataset after Unlock $redirectLink .= '&'.self::KEEP_TABLESORTER_FILTER.'=true'; diff --git a/application/views/system/infocenter/infocenterAbgewiesenData.php b/application/views/system/infocenter/infocenterAbgewiesenData.php index d09f0f41e..94d3d6ee1 100644 --- a/application/views/system/infocenter/infocenterAbgewiesenData.php +++ b/application/views/system/infocenter/infocenterAbgewiesenData.php @@ -70,6 +70,7 @@ $query = ' 'requiredPermissions' => 'infocenter', 'datasetRepresentation' => 'tablesorter', 'checkboxes' => 'PersonId', + 'additionalColumns' => array('Details'), 'columnsAliases' => array( 'PersonId', 'PreStudentID', @@ -82,6 +83,16 @@ $query = ' ), 'formatRow' => function($datasetRaw) { + /* NOTE: Dont use $this here for PHP Version compatibility */ + $datasetRaw->{'Details'} = sprintf( + 'Details', + site_url('system/infocenter/InfoCenter/showDetails'), + $datasetRaw->{'PersonId'}, + 'abgewiesen', + (isset($_GET['fhc_controller_id']) ? $_GET['fhc_controller_id'] : ''), + (isset($_GET['filter_id']) ? $_GET['filter_id'] : '') + ); + if ($datasetRaw->{'Nachricht'} === null) { $datasetRaw->{'Nachricht'} = 'Nein'; diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index 401e34099..c61bb3cd2 100644 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -57,10 +57,11 @@ if (isset($lockedby)): echo $this->p->t('global', 'wirdBearbeitetVon').': '; echo $lockedby; - if ($origin_page == 'index'): + if (in_array($origin_page, array('index', 'abgewiesen'))): $unlockpath = 'unlockPerson/'.$stammdaten->person_id; $unlockpath .= '?fhc_controller_id='.$fhc_controller_id; $unlockpath .= '&filter_id='.$prev_filter_id; + $unlockpath .= '&origin_page='.$origin_page; ?>    From 8584be651b00498d8d03395cfc3469e5fb46c528 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 17 May 2023 15:06:39 +0200 Subject: [PATCH 028/221] - sperren von rts bearbeitet --- vilesci/stammdaten/auswertung_fhtw.php | 103 +++++++++++++++++++------ 1 file changed, 79 insertions(+), 24 deletions(-) diff --git a/vilesci/stammdaten/auswertung_fhtw.php b/vilesci/stammdaten/auswertung_fhtw.php index e5975b651..2d3d1bc61 100644 --- a/vilesci/stammdaten/auswertung_fhtw.php +++ b/vilesci/stammdaten/auswertung_fhtw.php @@ -490,22 +490,58 @@ if ($rtprueflingEntSperren) exit(); } - if (isset($_POST['prestudent_id']) && is_numeric($_POST['prestudent_id']) + if (isset($_POST['person_id']) && is_numeric($_POST['person_id']) && isset($_POST['art'])) { - $qry = "UPDATE testtool.tbl_pruefling SET gesperrt =" . $db->db_add_param($_POST['art'], 'BOOLEAN') . " - WHERE prestudent_id IN - (SELECT prestudent_id FROM public.tbl_prestudent ps - JOIN public.tbl_person tp ON tp.person_id = ps.person_id - WHERE tp.person_id = (SELECT person_id FROM public.tbl_prestudent sps WHERE sps.prestudent_id = " . $db->db_add_param($_POST['prestudent_id']) . "));"; + $qry = "SELECT pruefling_id + FROM testtool.tbl_pruefling + WHERE prestudent_id IN ( + SELECT prestudent_id + FROM public.tbl_prestudent + WHERE person_id = ". $db->db_add_param($_POST['person_id']) . " + )"; + if ($result = $db->db_query($qry)) { - $msg = $_POST['art'] === 'false' ? 'Pruefling wurde gesperrt' : 'Pruefling wurde freigeschaltet'; - echo json_encode(array( - 'status' => 'ok', - 'msg' => $msg)); - exit(); + + if ($db->db_num_rows($result) === 0) + { + echo json_encode(array( + 'status' => 'warning', + 'msg' => 'Kein Pruefling gefunden!' + )); + exit(); + } + else + { + $pruefling_ids = array(); + while ($row = $db->db_fetch_object($result)) + { + $pruefling_ids[] = $row->pruefling_id; + } + + + $qry = "UPDATE testtool.tbl_pruefling SET gesperrt =" . $db->db_add_param($_POST['art'], 'BOOLEAN') . " + WHERE pruefling_id IN (" . $db->db_implode4SQL($pruefling_ids) . ")"; + + if ($result_update = $db->db_query($qry)) + { + $msg = $_POST['art'] === 'false' ? 'Pruefling wurde gesperrt' : 'Pruefling wurde freigeschaltet'; + echo json_encode(array( + 'status' => 'ok', + 'msg' => $msg)); + exit(); + } + else + { + echo json_encode(array( + 'status' => 'fehler', + 'msg' => 'Fehler beim speichern der Daten' + )); + exit(); + } + } } else { @@ -1650,6 +1686,7 @@ if (isset($_REQUEST['reihungstest']) || isset($_POST['rtauswsubmit'])) } $gebiete_arr = array(); + $gesperrt_arr = array(); while ($row = $db->db_fetch_object($result)) { // Hack für BEW-BB, wenn auch BEW-DL-Ergebnisse vorliegen @@ -1666,7 +1703,10 @@ if (isset($_REQUEST['reihungstest']) || isset($_POST['rtauswsubmit'])) $ergebnis[$row->prestudent_id] = new stdClass(); $gebiete_arr[$row->prestudent_id] = array(); } - + + if (!isset($gesperrt_arr[$row->person_id])) + $gesperrt_arr[$row->person_id] = new stdClass(); + $ergebnis[$row->prestudent_id]->prestudent_id = $row->prestudent_id; $ergebnis[$row->prestudent_id]->person_id = $row->person_id; $ergebnis[$row->prestudent_id]->reihungstest_id = $row->reihungstest_id; @@ -1678,7 +1718,6 @@ if (isset($_REQUEST['reihungstest']) || isset($_POST['rtauswsubmit'])) $ergebnis[$row->prestudent_id]->geschlecht = $row->geschlecht; $ergebnis[$row->prestudent_id]->idnachweis = $row->idnachweis; $ergebnis[$row->prestudent_id]->registriert = $row->registriert; - $ergebnis[$row->prestudent_id]->gesperrt = $row->gesperrt; $ergebnis[$row->prestudent_id]->stg_kurzbz = $row->stg_kurzbz; $ergebnis[$row->prestudent_id]->stg_bez = $row->stg_bez; $ergebnis[$row->prestudent_id]->ausbildungssemester = $row->ausbildungssemester; @@ -1690,6 +1729,13 @@ if (isset($_REQUEST['reihungstest']) || isset($_POST['rtauswsubmit'])) $ergebnis[$row->prestudent_id]->teilgenommen = $db->db_parse_bool($row->teilgenommen); $ergebnis[$row->prestudent_id]->qualifikationskurs = $db->db_parse_bool($row->qualifikationskurs); $ergebnis[$row->prestudent_id]->letzter_status = $row->letzter_status; + $ergebnis[$row->prestudent_id]->gesperrt = $row->gesperrt; + + $gesperrt = $db->db_parse_bool($row->gesperrt); + if (!isset($gesperrt_arr[$row->person_id]->gesperrt) || ($gesperrt_arr[$row->person_id]->gesperrt !== true && $gesperrt === true)) + { + $gesperrt_arr[$row->person_id]->gesperrt = $gesperrt; + } if (!isset($ergebnis[$row->prestudent_id]->gebiet[$row->gebiet_id])) { @@ -2440,7 +2486,7 @@ else }); } } - function prueflingEntSperren(prestudent_id, name, art) + function prueflingEntSperren(person_id, name, art) { if (art === true) var text = "sperren"; @@ -2450,7 +2496,7 @@ else if (confirm("Wollen Sie den Studenten "+ name + " wirklich " + text + "?")) { data = { - prestudent_id: prestudent_id, + person_id: person_id, art: art, rtprueflingEntSperren: true }; @@ -2464,21 +2510,30 @@ else { if(data.status !== "ok") { - $("#msgbox").attr("class","alert alert-danger"); - $("#msgbox").show(); - $("#msgbox").html(data["msg"]); + if (data.status === "warning") + { + $("#msgbox").attr("class","alert alert-warning"); + $("#msgbox").show(); + $("#msgbox").html(data["msg"]); + } + else + { + $("#msgbox").attr("class","alert alert-danger"); + $("#msgbox").show(); + $("#msgbox").html(data["msg"]); + } } else { if (art === true) { - $("#prueflingentsperren_" + prestudent_id).removeClass("hidden"); - $("#prueflingsperren_" + prestudent_id).addClass("hidden"); + $(".prueflingentsperren_" + person_id).removeClass("hidden"); + $(".prueflingsperren_" + person_id).addClass("hidden"); } else if (art === false) { - $("#prueflingsperren_" + prestudent_id).removeClass("hidden"); - $("#prueflingentsperren_" + prestudent_id).addClass("hidden"); + $(".prueflingsperren_" + person_id).removeClass("hidden"); + $(".prueflingentsperren_" + person_id).addClass("hidden"); } } }, @@ -3293,10 +3348,10 @@ else echo " - + - + "; From 54de577eee823a1e4def530cd2b43046fec1feae Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 17 May 2023 15:08:52 +0200 Subject: [PATCH 029/221] - ausblenden des warnings --- vilesci/stammdaten/auswertung_fhtw.php | 1 + 1 file changed, 1 insertion(+) diff --git a/vilesci/stammdaten/auswertung_fhtw.php b/vilesci/stammdaten/auswertung_fhtw.php index 2d3d1bc61..e72c03bc5 100644 --- a/vilesci/stammdaten/auswertung_fhtw.php +++ b/vilesci/stammdaten/auswertung_fhtw.php @@ -2515,6 +2515,7 @@ else $("#msgbox").attr("class","alert alert-warning"); $("#msgbox").show(); $("#msgbox").html(data["msg"]); + $("#msgbox").html(data["msg"]).delay(2000).fadeOut(); } else { From 2f573263ba5cb3d00ef3e018cf2684048ef32b7c Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 17 May 2023 16:00:34 +0200 Subject: [PATCH 030/221] - abfrage ob der pruefling bereits gesperrt ist --- cis/testtool/frage.php | 2 +- include/pruefling.class.php | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/cis/testtool/frage.php b/cis/testtool/frage.php index 6f47992a1..9f6cd4fb7 100644 --- a/cis/testtool/frage.php +++ b/cis/testtool/frage.php @@ -161,7 +161,7 @@ if(!isset($_SESSION['pruefling_id'])) $pruefling = new pruefling(); $pruefling->load($_SESSION['pruefling_id']); -if ($pruefling->gesperrt === 't') +if ($pruefling->isGesperrt($_SESSION['pruefling_id'])) die(""); if (!in_array($gebiet_id, $_SESSION['alleGebiete'])) diff --git a/include/pruefling.class.php b/include/pruefling.class.php index fc64d90c4..2a482d793 100644 --- a/include/pruefling.class.php +++ b/include/pruefling.class.php @@ -557,5 +557,31 @@ class pruefling extends basis_db return false; } } + + public function isGesperrt($pruefling_id) + { + $qry = "SELECT spruefling.gesperrt + FROM testtool.tbl_pruefling + JOIN public.tbl_prestudent USING(prestudent_id) + JOIN public.tbl_person USING (person_id) + JOIN public.tbl_prestudent pss ON pss.person_id = tbl_person.person_id + JOIN testtool.tbl_pruefling spruefling ON pss.prestudent_id = spruefling.prestudent_id + WHERE tbl_pruefling.pruefling_id = ".$this->db_add_param($pruefling_id, FHC_INTEGER)." + AND spruefling.gesperrt + LIMIT 1"; + + if($result = $this->db_query($qry)) + { + if ($this->db_num_rows($result) == 0) + return false; + else + return true; + } + else + { + $this->errormsg = 'Fehler bei einer Abfrage'; + return false; + } + } } ?> From 311d235fda8cad5e69ac78702ef50a4106c45c4c Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 17 May 2023 16:35:22 +0200 Subject: [PATCH 031/221] - abgewiesene gesperrt von spalte --- .../infocenter/infocenterAbgewiesenData.php | 33 +++++++++++++++++++ system/filtersupdate.php | 3 +- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/application/views/system/infocenter/infocenterAbgewiesenData.php b/application/views/system/infocenter/infocenterAbgewiesenData.php index 94d3d6ee1..2307ea87e 100644 --- a/application/views/system/infocenter/infocenterAbgewiesenData.php +++ b/application/views/system/infocenter/infocenterAbgewiesenData.php @@ -1,6 +1,7 @@ config->load('infocenter'); + $APP = '\'infocenter\''; $ABGEWIESENEN_STATUS = '\'Abgewiesener\''; $STUDIENGANG_TYP = '\''.$this->variablelib->getVar('infocenter_studiensgangtyp').'\''; $ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz'); @@ -17,6 +18,8 @@ $query = ' p.nachname AS "Nachname", so.studiengangkurzbzlang as "Studiengang", pss.insertamum AS "AbgewiesenAm", + pl.zeitpunkt AS "LockDate", + pl.lockuser AS "LockUser", ( SELECT l.zeitpunkt FROM system.tbl_log l @@ -54,6 +57,15 @@ $query = ' JOIN public.tbl_studiengang sg USING(studiengang_kz) JOIN lehre.tbl_studienplan sp USING(studienplan_id) JOIN lehre.tbl_studienordnung so USING(studienordnung_id) + LEFT JOIN ( + SELECT tpl.person_id, + tpl.zeitpunkt, + sp.nachname AS lockuser + FROM system.tbl_person_lock tpl + JOIN public.tbl_benutzer sb USING (uid) + JOIN public.tbl_person sp ON sb.person_id = sp.person_id + WHERE tpl.app = '.$APP.' + ) pl USING(person_id) WHERE pss.status_kurzbz = '. $ABGEWIESENEN_STATUS .' AND pss.studiensemester_kurzbz = '. $STUDIENSEMESTER .' AND (sg.typ IN ('. $STUDIENGANG_TYP .') @@ -78,6 +90,8 @@ $query = ' ucfirst($this->p->t('person', 'nachname')), ucfirst($this->p->t('lehre', 'studiengang')), ucfirst($this->p->t('infocenter', 'abgewiesenam')), + ucfirst($this->p->t('global', 'sperrdatum')), + ucfirst($this->p->t('global', 'gesperrtVon')), ucfirst($this->p->t('global', 'nachricht')), ucfirst($this->p->t('infocenter', 'kaution')) ), @@ -114,10 +128,29 @@ $query = ' { $datasetRaw->{'Kaution'} = 'Offen'; } + + if ($datasetRaw->{'LockDate'} == null) + { + $datasetRaw->{'LockDate'} = '-'; + } + + if ($datasetRaw->{'LockUser'} == null) + { + $datasetRaw->{'LockUser'} = '-'; + } $datasetRaw->{'AbgewiesenAm'} = date_format(date_create($datasetRaw->{'AbgewiesenAm'}),'Y-m-d H:i'); return $datasetRaw; + }, + + 'markRow' => function($datasetRaw) { + + if ($datasetRaw->LockDate != null) + { + return FilterWidget::DEFAULT_MARK_ROW_CLASS; + } } + ); echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray); diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 2ed253422..abdea4532 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -520,7 +520,8 @@ $filters = array( {"name": "Studiengang"}, {"name": "AbgewiesenAm"}, {"name": "Nachricht"}, - {"name": "Kaution"} + {"name": "Kaution"}, + {"name": "LockUser"} ], "filters": [] } From 5001713d16177e0470bb443337289e3ded3c9da7 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 19 May 2023 07:51:25 +0200 Subject: [PATCH 032/221] Erzwingen von Reload nach jeder Freigabe --- .../benotungstool/lvgesamtnoteverwalten.php | 288 +++++++++--------- 1 file changed, 146 insertions(+), 142 deletions(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index d498636ae..c32fa43e6 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -104,6 +104,152 @@ $sprachen->getAll(true); $errormsg = ''; +// eingetragene lv-gesamtnoten freigeben +if (isset($_REQUEST["freigabe"]) && ($_REQUEST["freigabe"] == 1)) +{ + // Passwort pruefen + if (checkldapuser($user, $_REQUEST['passwort'])) + { + $jetzt = date("Y-m-d H:i:s"); + $neuenoten = 0; + + $studlist = " + "; + + // entweder personenbezogene Daten einbinden + if (defined('CIS_GESAMTNOTE_FREIGABEMAIL_NOTE') && CIS_GESAMTNOTE_FREIGABEMAIL_NOTE) + { + $studlist .= " + + + + + "; + + if (defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE) + { + $studlist .= "\n"; + } + $studlist .= "\n"; + + $studlist .= "\n"; + } + // oder anonymisiert nur die UIDs einbinden + else + { + $studlist .= " + \n + "; + } + + // studentenquery + $qry_stud = "SELECT + DISTINCT uid, vorname, nachname, matrikelnr, kurzbzlang + FROM + campus.vw_student_lehrveranstaltung + JOIN campus.vw_student USING(uid) + JOIN public.tbl_studiengang ON campus.vw_student.studiengang_kz = public.tbl_studiengang.studiengang_kz + WHERE + studiensemester_kurzbz = " . $db->db_add_param($stsem) . " + AND lehrveranstaltung_id = " . $db->db_add_param($lvid, FHC_INTEGER) . " + ORDER BY nachname, vorname "; + if ($result_stud = $db->db_query($qry_stud)) + { + $i = 1; + while ($row_stud = $db->db_fetch_object($result_stud)) + { + $lvgesamtnote = new lvgesamtnote(); + if ($lvgesamtnote->load($lvid, $row_stud->uid, $stsem)) + { + if ($lvgesamtnote->benotungsdatum > $lvgesamtnote->freigabedatum) + { + $lvgesamtnote->freigabedatum = $jetzt; + $lvgesamtnote->freigabevon_uid = $user; + $lvgesamtnote->save(); + + if (defined('CIS_GESAMTNOTE_FREIGABEMAIL_NOTE') && CIS_GESAMTNOTE_FREIGABEMAIL_NOTE) + { + $studlist .= ""; + $studlist .= ""; + $studlist .= ""; + $studlist .= ""; + + if (defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE) + { + $studlist .= "\n"; + } + $studlist .= ""; + + $studlist .= "\n"; + } + else + { + $studlist .= "\n"; + } + + $neuenoten ++; + } + } + } + } + + $studlist .= "
" . $p->t('global/personenkz') . "" . $p->t('global/studiengang') . "" . $p->t('global/nachname') . "" . $p->t('global/vorname') . "" . $p->t('benotungstool/punkte') . "" . $p->t('benotungstool/note') . "" . $p->t('benotungstool/bearbeitetvon') . "
" . $p->t('global/uid') . "
" . trim($row_stud->matrikelnr) . "" . trim($row_stud->kurzbzlang) . "" . trim($row_stud->nachname) . "" . trim($row_stud->vorname) . ""; + if ($lvgesamtnote->punkte != '') + $studlist .= trim(number_format($lvgesamtnote->punkte, 2)); + $studlist .= "" . $noten_array[trim($lvgesamtnote->note)]['bezeichnung_mehrsprachig'][$sprache] . "" . $lvgesamtnote->mitarbeiter_uid; + if ($lvgesamtnote->updatevon != '') + $studlist .= " (" . $lvgesamtnote->updatevon . ")"; + $studlist .= "
" . trim($row_stud->uid) . "
"; + + // mail an assistentin und den user selber verschicken + if ($neuenoten > 0) + { + $lv = new lehrveranstaltung($lvid); + $sg = new studiengang($lv->studiengang_kz); + $lektor_adresse = $user . "@" . DOMAIN; + $adressen = $sg->email . ", " . $user . "@" . DOMAIN; + + $studienplan = new studienplan(); + $studienplan->getStudienplanLehrveranstaltung($lvid, $stsem); + $studienplan_bezeichnung = ''; + foreach ($studienplan->result as $row) + $studienplan_bezeichnung .= $row->bezeichnung . ' '; + + $mit = new mitarbeiter(); + $mit->load($user); + $name = $mit->anrede.' '.$mit->vorname.' '.$mit->nachname.' ('.$mit->kurzbz.')'; + + $betreff = 'Notenfreigabe ' . $lv->bezeichnung . ' ' . $lv->orgform_kurzbz . ' - ' . $studienplan_bezeichnung; + $mail = new mail($adressen, 'vilesci@' . DOMAIN, $betreff, ''); + $htmlcontent = " + + $name hat neue Noten für die Lehrveranstaltung\n\n
+ " . $sg->kuerzel . ' ' . $lv->semester . '.Semester + ' . $lv->bezeichnung . " " . $lv->orgform_kurzbz . " - " . $stsem . " +
eingetragen.\n

+ Die Noten können jetzt ins Zeugnis übernommen werden.\n"; + + $htmlcontent .= $studlist; + + $htmlcontent.= " +
Anzahl der Noten:" . $neuenoten . " +

" . $p->t('abgabetool/mailVerschicktAn') . ": " . $adressen . " + "; + $mail->setHTMLContent($htmlcontent); + $mail->setReplyTo($lektor_adresse); + $mail->send(); + } + + http_response_code(303); + header('Location: ' . $_SERVER['REQUEST_URI']); + exit; + } + else + { + $errormsg = $p->t('gesamtnote/passwortFalsch'); + } +} + echo ' @@ -926,148 +1072,6 @@ if (defined('CIS_ANWESENHEITSLISTE_NOTENLISTE_ANZEIGEN') && CIS_ANWESENHEITSLIST echo "
" . $p->t('benotungstool/notenlisteImport') . ""; } -// eingetragene lv-gesamtnoten freigeben -if (isset($_REQUEST["freigabe"]) && ($_REQUEST["freigabe"] == 1)) -{ - // Passwort pruefen - if (checkldapuser($user, $_REQUEST['passwort'])) - { - $jetzt = date("Y-m-d H:i:s"); - $neuenoten = 0; - - $studlist = " - "; - - // entweder personenbezogene Daten einbinden - if (defined('CIS_GESAMTNOTE_FREIGABEMAIL_NOTE') && CIS_GESAMTNOTE_FREIGABEMAIL_NOTE) - { - $studlist .= " - - - - - "; - - if (defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE) - { - $studlist .= "\n"; - } - $studlist .= "\n"; - - $studlist .= "\n"; - } - // oder anonymisiert nur die UIDs einbinden - else - { - $studlist .= " - \n - "; - } - - // studentenquery - $qry_stud = "SELECT - DISTINCT uid, vorname, nachname, matrikelnr, kurzbzlang - FROM - campus.vw_student_lehrveranstaltung - JOIN campus.vw_student USING(uid) - JOIN public.tbl_studiengang ON campus.vw_student.studiengang_kz = public.tbl_studiengang.studiengang_kz - WHERE - studiensemester_kurzbz = " . $db->db_add_param($stsem) . " - AND lehrveranstaltung_id = " . $db->db_add_param($lvid, FHC_INTEGER) . " - ORDER BY nachname, vorname "; - if ($result_stud = $db->db_query($qry_stud)) - { - $i = 1; - while ($row_stud = $db->db_fetch_object($result_stud)) - { - $lvgesamtnote = new lvgesamtnote(); - if ($lvgesamtnote->load($lvid, $row_stud->uid, $stsem)) - { - if ($lvgesamtnote->benotungsdatum > $lvgesamtnote->freigabedatum) - { - $lvgesamtnote->freigabedatum = $jetzt; - $lvgesamtnote->freigabevon_uid = $user; - $lvgesamtnote->save(); - - if (defined('CIS_GESAMTNOTE_FREIGABEMAIL_NOTE') && CIS_GESAMTNOTE_FREIGABEMAIL_NOTE) - { - $studlist .= ""; - $studlist .= ""; - $studlist .= ""; - $studlist .= ""; - - if (defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE) - { - $studlist .= "\n"; - } - $studlist .= ""; - - $studlist .= "\n"; - } - else - { - $studlist .= "\n"; - } - - $neuenoten ++; - } - } - } - } - - $studlist .= "
" . $p->t('global/personenkz') . "" . $p->t('global/studiengang') . "" . $p->t('global/nachname') . "" . $p->t('global/vorname') . "" . $p->t('benotungstool/punkte') . "" . $p->t('benotungstool/note') . "" . $p->t('benotungstool/bearbeitetvon') . "
" . $p->t('global/uid') . "
" . trim($row_stud->matrikelnr) . "" . trim($row_stud->kurzbzlang) . "" . trim($row_stud->nachname) . "" . trim($row_stud->vorname) . ""; - if ($lvgesamtnote->punkte != '') - $studlist .= trim(number_format($lvgesamtnote->punkte, 2)); - $studlist .= "" . $noten_array[trim($lvgesamtnote->note)]['bezeichnung_mehrsprachig'][$sprache] . "" . $lvgesamtnote->mitarbeiter_uid; - if ($lvgesamtnote->updatevon != '') - $studlist .= " (" . $lvgesamtnote->updatevon . ")"; - $studlist .= "
" . trim($row_stud->uid) . "
"; - - // mail an assistentin und den user selber verschicken - if ($neuenoten > 0) - { - $lv = new lehrveranstaltung($lvid); - $sg = new studiengang($lv->studiengang_kz); - $lektor_adresse = $user . "@" . DOMAIN; - $adressen = $sg->email . ", " . $user . "@" . DOMAIN; - - $studienplan = new studienplan(); - $studienplan->getStudienplanLehrveranstaltung($lvid, $stsem); - $studienplan_bezeichnung = ''; - foreach ($studienplan->result as $row) - $studienplan_bezeichnung .= $row->bezeichnung . ' '; - - $mit = new mitarbeiter(); - $mit->load($user); - $name = $mit->anrede.' '.$mit->vorname.' '.$mit->nachname.' ('.$mit->kurzbz.')'; - - $betreff = 'Notenfreigabe ' . $lv->bezeichnung . ' ' . $lv->orgform_kurzbz . ' - ' . $studienplan_bezeichnung; - $mail = new mail($adressen, 'vilesci@' . DOMAIN, $betreff, ''); - $htmlcontent = " - - $name hat neue Noten für die Lehrveranstaltung\n\n
- " . $sg->kuerzel . ' ' . $lv->semester . '.Semester - ' . $lv->bezeichnung . " " . $lv->orgform_kurzbz . " - " . $stsem . " -
eingetragen.\n

- Die Noten können jetzt ins Zeugnis übernommen werden.\n"; - - $htmlcontent .= $studlist; - - $htmlcontent.= " -
Anzahl der Noten:" . $neuenoten . " -

" . $p->t('abgabetool/mailVerschicktAn') . ": " . $adressen . " - "; - $mail->setHTMLContent($htmlcontent); - $mail->setReplyTo($lektor_adresse); - $mail->send(); - } - } - else - { - $errormsg = $p->t('gesamtnote/passwortFalsch'); - } -} - if (defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE) { $onclickpath = "notenschluessel.php?lehrveranstaltung_id=$lvid&stsem=$stsem"; From 4154df17046b71556b7179912049a6b7d482a9aa Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Fri, 19 May 2023 14:47:05 +0200 Subject: [PATCH 033/221] Property to Enable/disable the download button --- public/js/components/filter/Filter.js | 13 +- public/js/components/filter/Table/Download.js | 246 ++++++++++++++++++ 2 files changed, 256 insertions(+), 3 deletions(-) create mode 100644 public/js/components/filter/Table/Download.js diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index eb5f1a005..ae2ab9e7a 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -20,6 +20,7 @@ import {CoreRESTClient} from '../../RESTClient.js'; import {CoreFetchCmpt} from '../../components/Fetch.js'; import FilterConfig from './Filter/Config.js'; import FilterColumns from './Filter/Columns.js'; +import TableDownload from './Table/Download.js'; // const FILTER_COMPONENT_NEW_FILTER = 'Filter Component New Filter'; @@ -34,7 +35,8 @@ export const CoreFilterCmpt = { components: { CoreFetchCmpt, FilterConfig, - FilterColumns + FilterColumns, + TableDownload }, emits: [ 'nwNewEntry' @@ -52,7 +54,11 @@ export const CoreFilterCmpt = { }, tabulatorOptions: Object, tabulatorEvents: Array, - tableOnly: Boolean + tableOnly: Boolean, + download: { + type: [Boolean, String, Function, Array, Object], + default: false + } }, data: function() { return { @@ -454,7 +460,7 @@ export const CoreFilterCmpt = { mounted() { this.initTabulator(); }, - template: `{{$attrs}} + template: ` [ {{ filterName }} ] + . + */ + +const DEFAULT_ICONS = { + jsonLines: 'fa-file-lines', + xlsx: 'fa-file-excel', + pdf: 'fa-file-pdf', + html: 'fa-file-code', + json: 'fa-file', + csv: 'fa-file-csv' +}; +const DEFAULT_LABELS = { + jsonLines: 'Download as JSONLINES', + xlsx: 'Download as XLSX', + pdf: 'Download as PDF', + html: 'Download as HTML', + json: 'Download as JSON', + csv: 'Download as CSV ' +}; + + +/** + * + */ +export default { + props: { + tabulator: Object, + config: { + type: [Boolean, String, Function, Array, Object], + default: false + } + }, + computed: { + currentConfig() { + if (!this.config) + return false; + + let config = this.config; + + if (config instanceof Function) + return [config]; + + if (config === null) + return []; + + if (this.config === true) + config = ['csv']; + + if (Object.prototype.toString.call(config) === "[object String]") + config = config.split(','); + + if (typeof config === 'object' && !Array.isArray(config)) { + let newConfig = []; + for (var k in config) { + var v = config[k], type; + + if (!v) + continue; + + if (Object.prototype.toString.call(v) === "[object String]") { + type = this.stringToFileFormatter(v); + if (type !== null) { + newConfig.push({ + icon: 'fa-solid ' + DEFAULT_ICONS[type], + label: v === k ? DEFAULT_LABELS[type] : k, + formatter: type + }); + } else { + type = this.stringToFileFormatter(k); + if(type !== null) { + newConfig.push({ + icon: 'fa-solid ' + DEFAULT_ICONS[type], + label: v, + formatter: type + }); + } else { + alert('neither ' + k + ' nor ' + v + ' are supported download file types'); + } + } + } else if (typeof v === 'object' && !Array.isArray(v)) { + type = this.stringToFileFormatter(k); + if (type !== null) { + if (v.formatter === undefined) + v.formatter = type; + if (v.label === undefined) + v.label = DEFAULT_LABELS[type]; + if (v.icon === undefined) + v.icon = DEFAULT_ICONS[type]; + newConfig.push(v); + } else { + if (v.label === undefined) + v.label = k; + newConfig.push(v); + } + } else { + type = this.stringToFileFormatter(k); + if (type !== null) { + newConfig.push({ + icon: 'fa-solid ' + DEFAULT_ICONS[type], + label: DEFAULT_LABELS[type], + formatter: type + }); + } else { + alert(k + ' is not a supported download file type'); + } + } + } + config = newConfig; + } + + if (Array.isArray(config)) + { + config = config.map(el => { + if (Object.prototype.toString.call(el) === "[object String]") { + let formatter = this.stringToFileFormatter(el); + if (formatter === null) + return null; + return { + icon: 'fa-solid ' + DEFAULT_ICONS[formatter], + label: DEFAULT_LABELS[formatter], + formatter + }; + } + + if (el instanceof Function) + return { + formatter: el + } + + if (typeof el === 'object' && !Array.isArray(el) && el !== null) { + if (el.formatter instanceof Function) + return el; + if (this.validateFileFormatter(el.formatter)) + return el; + } + + return null; + }).filter(el => el !== null); + + if (config.length < 2) + return config; + + if (config.filter(el => el.label || el.icon).length == config.length) + return config; + + alert('Config not valid'); + } + + return []; + } + }, + methods: { + stringToFileFormatter(input) { + let lcInput = input.toLowerCase(); + + if (lcInput == 'jsonlines') + return 'jsonLines'; + + if (['xlsx', 'pdf', 'html', 'json', 'csv'].includes(lcInput)) + return lcInput; + + return null; + }, + validateFileFormatter(input) { + let formatter = this.stringToFileFormatter(input); + if (!formatter) { + alert(input + ' is not a supported file formatter'); + return false; + } + if (formatter == 'xlsx') { + if (!window.XLSX) { + alert('XLSX Library not loaded'); + return false; + } + } + if (formatter == 'pdf') { + if (!window.jspdf) { + alert('jsPDF Library not loaded'); + return false; + } + var doc = new jspdf.jsPDF({}); + if (!doc.autoTable) { + alert('jsPDF-AutoTable Plugin not loaded'); + return false; + } + } + return true; + }, + download(config) { + this.tabulator.download(config.formatter, config.file, config.options) + } + }, + template: ` + + ` +}; + From 429c595e0455baea02e272e0b72f816b708d9178 Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Mon, 22 May 2023 11:59:26 +0200 Subject: [PATCH 034/221] Reload Button --- public/js/components/filter/Filter.js | 54 +++++++++++++++++++-------- 1 file changed, 38 insertions(+), 16 deletions(-) diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index ae2ab9e7a..7fbeb84bc 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -55,6 +55,7 @@ export const CoreFilterCmpt = { tabulatorOptions: Object, tabulatorEvents: Array, tableOnly: Boolean, + reload: Boolean, download: { type: [Boolean, String, Function, Array, Object], default: false @@ -73,6 +74,7 @@ export const CoreFilterCmpt = { filterFields: null, availableFilters: null, + selectedFilter: null, // FetchCmpt binded properties fetchCmptRefresh: false, @@ -160,6 +162,12 @@ export const CoreFilterCmpt = { } }, methods: { + reloadTable() { + if (this.tableOnly) + this.tabulator.reload(); + else + this.getFilter(); + }, initTabulator() { // Define a default tabulator options in case it was not provided let tabulatorOptions = {...{ @@ -211,8 +219,16 @@ export const CoreFilterCmpt = { * */ getFilter: function() { - // - this.startFetchCmpt(CoreFilterAPIs.getFilter, null, this.render); + if (this.selectedFilter === null) + this.startFetchCmpt(CoreFilterAPIs.getFilter, null, this.render); + else + this.startFetchCmpt( + CoreFilterAPIs.getFilterById, + { + filterId: this.selectedFilter + }, + this.render + ); }, /** * @@ -381,6 +397,7 @@ export const CoreFilterCmpt = { * */ handlerSaveCustomFilter: function(customFilterName) { + this.selectedFilter = null; // this.startFetchCmpt( CoreFilterAPIs.saveCustomFilter, @@ -394,11 +411,14 @@ export const CoreFilterCmpt = { * */ handlerRemoveCustomFilter: function(event) { + filterId = event.currentTarget.getAttribute("href").substring(1); + if (filterId === this.selectedFilter) + this.selectedFilter = null; // this.startFetchCmpt( CoreFilterAPIs.removeCustomFilter, { - filterId: event.currentTarget.getAttribute("href").substring(1) + filterId: filterId }, this.getFilter ); @@ -427,16 +447,11 @@ export const CoreFilterCmpt = { this.switchFilter(filterId); }, switchFilter(filterId) { - // Ajax call - this.startFetchCmpt( - CoreFilterAPIs.getFilterById, - { - filterId - }, - this.render - ); + this.selectedFilter = filterId; + this.getFilter(); }, applyFilterConfig(filterFields) { + this.selectedFilter = null; this.startFetchCmpt( CoreFilterAPIs.applyFilterFields, { @@ -480,11 +495,18 @@ export const CoreFilterCmpt = {
-
- [ {{ filterName }} ] - - - +
+
+ [ {{ filterName }} ] + + + +
+
+ +
Date: Tue, 23 May 2023 13:17:27 +0200 Subject: [PATCH 035/221] - texte und anzeige angepasst --- include/reihungstest.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/reihungstest.class.php b/include/reihungstest.class.php index 2da424af5..633ddf1da 100644 --- a/include/reihungstest.class.php +++ b/include/reihungstest.class.php @@ -688,14 +688,14 @@ class reihungstest extends basis_db tbl_reihungstest.aufnahmegruppe_kurzbz, tbl_studiengang.typ, UPPER(typ::varchar(1) || kurzbz) AS stg_kuerzel, - tbl_studiengang.bezeichnung, - tbl_studiengang.english + so.studiengangbezeichnung as bezeichnung, + so.studiengangbezeichnung_englisch as english FROM public.tbl_rt_person - JOIN - public.tbl_reihungstest ON (rt_id=reihungstest_id) - LEFT JOIN - public.tbl_studiengang ON tbl_reihungstest.studiengang_kz = tbl_studiengang.studiengang_kz + JOIN public.tbl_reihungstest ON (rt_id=reihungstest_id) + JOIN public.tbl_studiengang ON tbl_reihungstest.studiengang_kz = tbl_studiengang.studiengang_kz + JOIN lehre.tbl_studienplan sp USING(studienplan_id) + JOIN lehre.tbl_studienordnung so USING(studienordnung_id) WHERE tbl_rt_person.person_id=".$this->db_add_param($person_id); From d10a229b59aabbee3bed36c2a27d46081e7585ed Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Tue, 23 May 2023 14:56:31 +0200 Subject: [PATCH 036/221] Slot for action buttons --- public/js/components/filter/Filter.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index 7fbeb84bc..cf0fcf5e1 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -83,7 +83,9 @@ export const CoreFilterCmpt = { fetchCmptDataFetched: null, tabulator: null, - tableBuilt: false + tableBuilt: false, + tabulatorHasSelector: false, + selectedData: [] }; }, computed: { @@ -130,6 +132,8 @@ export const CoreFilterCmpt = { { // If the column has to be displayed or not col.visible = selectedFields.indexOf(col.field) >= 0; + if (col.formatter == 'rowSelection') + col.visible = true; if (col.hasOwnProperty('resizable')) col.resizable = col.visible; @@ -182,6 +186,9 @@ export const CoreFilterCmpt = { tabulatorOptions.columns = this.filteredColumns; } + if (tabulatorOptions.columns && tabulatorOptions.columns.filter(el => el.formatter == 'rowSelection').length) + this.tabulatorHasSelector = true; + // Start the tabulator with the build options this.tabulator = new Tabulator( this.$refs.table, @@ -195,6 +202,9 @@ export const CoreFilterCmpt = { this.tabulator.on(evt.event, evt.handler); } this.tabulator.on('tableBuilt', () => this.tableBuilt = true); + this.tabulator.on("rowSelectionChanged", data => { + this.selectedData = data; + }); if (this.tableOnly) { this.tabulator.on('tableBuilt', () => { const cols = this.tabulator.getColumns(); @@ -213,6 +223,7 @@ export const CoreFilterCmpt = { }, _updateTabulator() { this.tabulator.setData(this.filteredData); + this.tabulatorHasSelector = this.filteredColumns.filter(el => el.formatter == 'rowSelection').length; this.tabulator.setColumns(this.filteredColumns); }, /** @@ -502,10 +513,12 @@ export const CoreFilterCmpt = {
-
+
+ Mit {{selectedData.length}} ausgewählten: +
From 94a15093ac3c14788f0764158301a0eaa11e3e1b Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Tue, 23 May 2023 15:26:49 +0200 Subject: [PATCH 037/221] New Button --- public/js/components/filter/Filter.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index cf0fcf5e1..ed9452925 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -59,7 +59,11 @@ export const CoreFilterCmpt = { download: { type: [Boolean, String, Function, Array, Object], default: false - } + }, + newBtnShow: Boolean, + newBtnClass: [String, Array, Object], + newBtnDisabled: Boolean, + newBtnLabel: String }, data: function() { return { @@ -513,7 +517,11 @@ export const CoreFilterCmpt = {
-
+
+ From 09bc98543138f75d16a9e4b7a968a58b19f7f071 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Tue, 23 May 2023 16:08:50 +0200 Subject: [PATCH 038/221] Notenumrechnung beim Punkteimport, Fehlermeldung wenn Note oder Punkte fehlen. --- .../benotungstool/lvgesamtnoteverwalten.php | 149 ++++++++++++------ .../benotungstool/nachpruefungeintragen.php | 15 ++ cis/private/lehre/notenliste.xls.php | 20 ++- 3 files changed, 132 insertions(+), 52 deletions(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index c32fa43e6..6dce2b6ae 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -341,6 +341,9 @@ foreach ($noten_obj->result as $row) } ?> + + const CIS_GESAMTNOTE_PUNKTE = ; + function getOffset(pos) { var x,y; @@ -799,33 +802,48 @@ foreach ($noten_obj->result as $row) } ?> + var linenumber = 0; for(row in rows) { - zeile = rows[row].split(" "); - - - - if (zeile[0]!='' && zeile[1]!='') + linenumber++; + if( rows[row] == '' ) { - gradedata['matrikelnr_'+i]=zeile[0]; - - - i++; + //skip empty lines + continue; } + zeile = rows[row].split(" "); + + if( zeile.length < 2 ) + { + alertMsg = alertMsg + "Zeile " + linenumber + ': ' + + 'Zu wenig Paramter - 2 erforderlich. ' + + 'Die Zeile wurde uebersprungen.' + "\n\n"; + continue; + } + + if (CIS_GESAMTNOTE_PUNKTE == false) + { + // check for valid grades + if (validGrades.indexOf(zeile[1]) === -1) + { + alertMsg = alertMsg + "Zeile " + linenumber + ': ' + + "Die Note "+zeile[1]+" ist nicht zulaessig. " + + "Die Zeile wurde uebersprungen. \n\n"; + continue; + } + } + + gradedata['matrikelnr_'+i]=zeile[0]; + if (CIS_GESAMTNOTE_PUNKTE) + { + gradedata['punkte_'+i]= zeile[1]; + } + else + { + gradedata['note_'+i]= zeile[1]; + } + + i++; } if (alertMsg != "") @@ -895,35 +913,70 @@ foreach ($noten_obj->result as $row) } ?> - + var linenumber = 0; for(row in rows) { - zeile = rows[row].split(" "); - - - - if (zeile[0]!='' && zeile[1]!='' && zeile[2]!='') + linenumber++; + if( rows[row] == '' ) { - gradedata['student_uid_'+i]=zeile[0]; - gradedata['datumNachp_'+i]=zeile[1]; - - - i++; + //skip empty lines + continue; } + zeile = rows[row].split(" "); + + if( zeile.length < 3 ) + { + alertMsg = alertMsg + "Zeile " + linenumber + ': ' + + 'Zu wenig Paramter - 3 erforderlich. ' + + 'Die Zeile wurde uebersprungen.' + "\n\n"; + continue; + } + + if( zeile[1] == '' && zeile[2] == '' ) + { + // ignore lines just copied from excel + continue; + } + + if( zeile[2] == '' ) + { + alertMsg = alertMsg + "Zeile " + linenumber + ': ' + + "Die Note oder Punkte fehlen. " + + "Die Zeile wurde uebersprungen. \n\n"; + continue; + } + + if (CIS_GESAMTNOTE_PUNKTE == false) + { + // check for valid grades + if (validGrades.indexOf(zeile[2]) === -1) + { + alertMsg = alertMsg + "Zeile " + linenumber + ': ' + + "Die Note "+zeile[2]+" ist nicht zulaessig. " + + "Die Zeile wurde uebersprungen. \n\n"; + continue; + } + } + + if( !zeile[1].match(/[0-9]{2}\.[0-9]{2}\.[0-9]{4}/) ) + { + alertMsg = alertMsg + "Zeile " + linenumber + ': ' + + "Das Datum "+zeile[1]+" fehlt oder ist nicht zulaessig. " + + "Die Zeile wurde uebersprungen. \n\n"; + continue; + } + + gradedata['student_uid_'+i]=zeile[0]; + gradedata['datumNachp_'+i]=zeile[1]; + if (CIS_GESAMTNOTE_PUNKTE) + { + gradedata['punkte_'+i]= zeile[2]; + } + else + { + gradedata['note_'+i]= zeile[2]; + } + i++; } diff --git a/cis/private/lehre/benotungstool/nachpruefungeintragen.php b/cis/private/lehre/benotungstool/nachpruefungeintragen.php index 804ab34fb..873c0f173 100644 --- a/cis/private/lehre/benotungstool/nachpruefungeintragen.php +++ b/cis/private/lehre/benotungstool/nachpruefungeintragen.php @@ -130,6 +130,17 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) continue; } $punkte=str_replace(',', '.', $punkte); + if($punkte!='') + { + // Bei Punkteeingabe wird die Note nochmals geprueft und ggf korrigiert + $notenschluessel = new notenschluessel(); + $note_pruef = $notenschluessel->getNote($punkte, $lvid, $stsem); + if($note_pruef!=$note) + { + $note = $note_pruef; + $note_dirty=true; + } + } $datum = $_POST['datumNachp_'.$id]; //check Datumsformat @@ -172,6 +183,10 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) $note = $noten_anmerkung[$note]; } $response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte); + if($response!='neu' && $response!='update' && $response!='update_f') + { + echo $response; + } } else { diff --git a/cis/private/lehre/notenliste.xls.php b/cis/private/lehre/notenliste.xls.php index 2e0403139..63cf45d29 100644 --- a/cis/private/lehre/notenliste.xls.php +++ b/cis/private/lehre/notenliste.xls.php @@ -226,7 +226,7 @@ else if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2) { - $worksheet->write($lines,8,$p->t('global/uid'),$format_border_bottom); + $worksheet->write($lines,8,$p->t('global/personenkennzeichen'),$format_border_bottom); $worksheet->write($lines,9,$p->t('global/datum'),$format_border_bottom); if(defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE) $worksheet->write($lines,10,$p->t('benotungstool/punkte'),$format_border_bottom); @@ -236,7 +236,7 @@ else if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) { - $worksheet->write($lines,12,$p->t('global/uid'),$format_border_bottom); + $worksheet->write($lines,12,$p->t('global/personenkennzeichen'),$format_border_bottom); $worksheet->write($lines,13,$p->t('global/datum'),$format_border_bottom); if(defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE) $worksheet->write($lines,14,$p->t('benotungstool/punkte'),$format_border_bottom); @@ -328,7 +328,7 @@ else // Nachprüfung if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2) { - $worksheet->write($lines,8, $elem->uid, $format_highlightright); + $worksheet->write($lines,8, '="'.trim($elem->matrikelnr).'"', $format_highlight); $pr = new Pruefung(); $pr->getPruefungen($elem->uid, "Termin2", $lvid, $sem); $output2 = $pr->result; @@ -349,7 +349,7 @@ else // Nachprüfung if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) { - $worksheet->write($lines,12, $elem->uid, $format_highlightright); + $worksheet->write($lines,12, '="'.trim($elem->matrikelnr).'"', $format_highlight); $pr = new Pruefung(); $pr->getPruefungen($elem->uid, "Termin3", $lvid, $sem); $output3 = $pr->result; @@ -420,5 +420,17 @@ else $worksheet->setColumn(0, 3, 25); $worksheet->setColumn(0, 4, 7); $worksheet->setColumn(0, 5, 21); + + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2) + { + $worksheet->setColumn(8, 8, 15); + $worksheet->setColumn(9, 9, 10); + } + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) + { + $worksheet->setColumn(12, 12, 15); + $worksheet->setColumn(13, 13, 10); + } + $workbook->close(); ?> From be331d6200bbe87d70dc8bcc79b02a3602f3719c Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Wed, 24 May 2023 12:05:36 +0200 Subject: [PATCH 039/221] Styles --- public/js/components/filter/Filter.js | 20 +++++++++++-------- public/js/components/filter/Filter/Columns.js | 18 ++++++++--------- public/js/components/filter/Table/Download.js | 7 ++++--- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index ed9452925..776405614 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -510,14 +510,8 @@ export const CoreFilterCmpt = {
-
-
- [ {{ filterName }} ] - - - -
-
+
+
+
+ [ {{ filterName }} ] + + + + + + + +
-
-
-
- {{ names[fieldToDisplay] || fieldToDisplay }} -
+
+
+ {{ names[fieldToDisplay] || fieldToDisplay }}
diff --git a/public/js/components/filter/Table/Download.js b/public/js/components/filter/Table/Download.js index 7d4512d55..057fdad5e 100644 --- a/public/js/components/filter/Table/Download.js +++ b/public/js/components/filter/Table/Download.js @@ -42,7 +42,8 @@ export default { config: { type: [Boolean, String, Function, Array, Object], default: false - } + }, + iconClass: [String, Array, Object] }, computed: { currentConfig() { @@ -215,7 +216,7 @@ export default { aria-title="Download" @click.prevent="download(currentConfig[0])" > - +