From 9b3b571bd9127dc5e18dcc806574107e53f7218b Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 6 Oct 2022 08:55:11 +0200 Subject: [PATCH 01/30] 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 02/30] 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 03/30] 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 04/30] 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 05/30] 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 06/30] 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 07/30] =?UTF-8?q?Adaptierung=20Vorlage=20Notenliste.xls=20?= =?UTF-8?q?um=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 540fc4bede933b704d2d69aeb0325bcc0da780c0 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 15 Nov 2022 11:22:47 +0100 Subject: [PATCH 08/30] 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 84ca798dadc5ad814a949d69093ae3d113b369b9 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Wed, 8 Mar 2023 13:50:33 +0100 Subject: [PATCH 09/30] 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 3e056ebf3d35c6eacae1fd042e9358c3925c532c Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 24 Mar 2023 15:21:01 +0100 Subject: [PATCH 10/30] =?UTF-8?q?Notenimport=20Nachpr=C3=BCfung=20und=203.?= =?UTF-8?q?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 11/30] 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 12/30] 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 33e313a633a4001f01b1ce55c4dec39f62c2d2e1 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 8 May 2023 12:12:42 +0200 Subject: [PATCH 13/30] 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 14/30] 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 5001713d16177e0470bb443337289e3ded3c9da7 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 19 May 2023 07:51:25 +0200 Subject: [PATCH 15/30] 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 09bc98543138f75d16a9e4b7a968a58b19f7f071 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Tue, 23 May 2023 16:08:50 +0200 Subject: [PATCH 16/30] 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 4e22b1ac1c296cd61e9c33e14b811ad200a3d209 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 19 Jun 2023 15:03:38 +0200 Subject: [PATCH 17/30] Added: New Job sendMailRecommendationRequests Send Sancho mail to LV-Leitung (fallback Lectors) that were requested for recommendation yesterday. --- .../controllers/jobs/AnrechnungJob.php | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/application/controllers/jobs/AnrechnungJob.php b/application/controllers/jobs/AnrechnungJob.php index 7aae80d54..48ee6d4ca 100644 --- a/application/controllers/jobs/AnrechnungJob.php +++ b/application/controllers/jobs/AnrechnungJob.php @@ -227,6 +227,74 @@ class AnrechnungJob extends JOB_Controller $this->logInfo('SUCCEDED: Sending emails to STGL about yesterdays new Anrechnungen succeded.'); } + // Send Sancho mail to LV-Leitung (fallback Lectors) that were requested for recommendation yesterday. + public function sendMailRecommendationRequests(){ + + $this->logInfo('Start AnrechnungJob sendMailRecommendationRequests to inform lecturers about yesterdays requests for recommendation.'); + + // Get Anrechnungen, für die gestern eine Empfehlung angefragt worden ist + $this->AnrechnungModel->addSelect('astat.anrechnung_id, astat.datum, astat.insertamum'); + $this->AnrechnungModel->addDistinct('astat.anrechnung_id'); + $this->AnrechnungModel->addJoin('lehre.tbl_anrechnung_anrechnungstatus astat', 'anrechnung_id'); + + $result = $this->AnrechnungModel->loadWhere(' + studiensemester_kurzbz = (SELECT studiensemester_kurzbz FROM tbl_studiensemester WHERE now()::date BETWEEN start AND ende) + AND genehmigt_von IS NULL + AND empfehlung_anrechnung IS NULL + AND status_kurzbz = '. $this->db->escape(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR) .' -- in Bearbeitung durch Lektor + AND NOW()::date = (astat.datum + interval \'1 day\') -- nur gestrige Empfehlungsanfrage + ORDER BY astat.anrechnung_id, astat.datum DESC, astat.insertamum DESC -- nur letzten status dabei prüfen + '); + + // Exit, wenn es gestern keine Empfehlungsanfragen gab + if (!hasData($result)) + { + $this->logInfo('End AnrechnungJob sendMailRecommendationRequests, because no recommendations were requested yesterday.'); + exit; + } + + $anrechnung_id_arr = array_column(getData($result), 'anrechnung_id'); + + $arr_lvLector_arr = array(); + foreach ($anrechnung_id_arr as $anrechnung_id) + { + $arr_lvLector_arr[]= $this->anrechnunglib->getLectors($anrechnung_id); // Returns LV Leitung. If not present, then all lectors of LV. + } + + // Unique lector array to send only one mail per lector + $arr_lvLector_arr = array_unique($arr_lvLector_arr, SORT_REGULAR); + + // Link to 'Anrechnungen prüfen' dashboard + $url = + CIS_ROOT. 'cis/index.php?menu='. + CIS_ROOT. 'cis/menu.php?content_id=&content='. + CIS_ROOT. index_page(). self::REVIEW_ANRECHNUNG_URI; + + foreach ($arr_lvLector_arr as $lvLector_arr) + { + foreach ($lvLector_arr as $lector) + { + // Prepare mail content + $fields = array( + 'vorname' => $lector->vorname, + 'stgl_name' => 'Die Studiengangsleitung', + 'link' => anchor($url, 'Anrechnungsanträge Übersicht') + ); + + // Send mail + sendSanchoMail( + 'AnrechnungEmpfehlungAnfordern', + $fields, + $lector->uid. '@'. DOMAIN, + 'Deine Empfehlung wird benötigt zur Anerkennung nachgewiesener Kenntnisse' + ); + } + } + + $this->logInfo('SUCCEDED AnrechnungJob sendMailRecommendationRequests'); + + } + /** * Send Sancho mail to students, whose Anrechnungen were approved 24 hours ago. */ From 82019bb77ffeb4c0a1562f702b896bc9ccc5f4f2 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 20 Jun 2023 10:45:38 +0200 Subject: [PATCH 18/30] Deactivated: einzelne Empehlungsanfrage-Mails an Lektoren deaktiviert --- .../anrechnung/ApproveAnrechnungDetail.php | 36 ++++++++----------- .../ApproveAnrechnungUebersicht.php | 15 +------- 2 files changed, 15 insertions(+), 36 deletions(-) diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index 8f71dc8d0..3a62ff7d9 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -242,7 +242,7 @@ class approveAnrechnungDetail extends Auth_Controller $empfehlungsanfrage_an = !isEmptyArray($result) ? implode(', ', array_column($result, 'fullname')) : ''; // Request Recommendation - if($this->anrechnunglib->requestRecommendation($anrechnung_id)) + if ($this->anrechnunglib->requestRecommendation($anrechnung_id)) { $retval[]= array( 'anrechnung_id' => $anrechnung_id, @@ -254,31 +254,23 @@ class approveAnrechnungDetail extends Auth_Controller ); } - /** - * Send mails to lectors - * NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector - * even if they are required for more recommendations - * */ - if (!isEmptyArray($retval)) - { - if ($this->config->item('send_mail') === TRUE) - { - $this->_sendSanchoMailToLectors($anrechnung_id); - } - - // Output json to ajax - return $this->outputJsonSuccess($retval); - } - // Output json to ajax + if ($empfehlungsanfrage_an == '') + { + $this->terminateWithJsonError( + "Empfehlung wurde nicht angefordert,\nDer LV sind keine LektorInnen zugeteilt." + ); + } + if (isEmptyArray($retval)) { - $this->terminateWithJsonError( - "Empfehlung wurde nicht angefordert,\nDer LV sind keine LektorInnen zugeteilt." - ); + $this->terminateWithJsonError("Empfehlung wurde nicht angefordert"); } - - $this->terminateWithJsonError($this->p->t('ui', 'errorNichtAusgefuehrt')); + else + { + // Output json to ajax + return $this->outputJsonSuccess($retval); + } } /** diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php index f13814e66..b5a44b8f6 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php @@ -249,19 +249,6 @@ class approveAnrechnungUebersicht extends Auth_Controller } } - /** - * Send mails - * NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector - * even if they are required for more recommendations - * */ - if (!isEmptyArray($retval)) - { - if ($this->config->item('send_mail') === TRUE) - { - $this->_sendSanchoMail($retval); - } - } - // Output json to ajax if (isEmptyArray($retval)) { @@ -273,7 +260,7 @@ class approveAnrechnungUebersicht extends Auth_Controller $this->terminateWithJsonError('Es wurden keine Empfehlungen angefordert'); } - return $this->outputJsonSuccess($retval); + $this->outputJsonSuccess($retval); } /** From 17c2004a394f78a0f653e7fa91b7968572bfdcab Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 20 Jun 2023 13:36:42 +0200 Subject: [PATCH 19/30] Adapted: Check for config 'fbl' in Job to send Sammelmail only to LV-Leitung (no fallback to other lectors) --- application/controllers/jobs/AnrechnungJob.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/application/controllers/jobs/AnrechnungJob.php b/application/controllers/jobs/AnrechnungJob.php index 48ee6d4ca..b442c7e56 100644 --- a/application/controllers/jobs/AnrechnungJob.php +++ b/application/controllers/jobs/AnrechnungJob.php @@ -37,6 +37,9 @@ class AnrechnungJob extends JOB_Controller $this->load->helper('hlp_sancho_helper'); $this->load->library('AnrechnungLib'); + + // Load configs + $this->load->config('anrechnung'); } /** @@ -258,7 +261,15 @@ class AnrechnungJob extends JOB_Controller $arr_lvLector_arr = array(); foreach ($anrechnung_id_arr as $anrechnung_id) { - $arr_lvLector_arr[]= $this->anrechnunglib->getLectors($anrechnung_id); // Returns LV Leitung. If not present, then all lectors of LV. + // Get full name of Fachbereichsleitung or LV Leitung. + if($this->config->item('fbl') === TRUE) + { + $arr_lvLector_arr[] = $this->anrechnunglib->getLeitungOfLvOe($anrechnung_id); + } + else + { + $arr_lvLector_arr[] = $this->anrechnunglib->getLectors($anrechnung_id); // Returns LV Leitung. If not present, then all lectors of LV. + } } // Unique lector array to send only one mail per lector From 8bb3b6d53c4b0ff03759acab4d30d94236895a60 Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 20 Jul 2023 10:48:03 +0200 Subject: [PATCH 20/30] DB Update: added 2 attributes to tbl_anrechnung - begruendung_ects (text) - begruendung_lvinhalt (text) --- system/dbupdate_3.4.php | 3 +- ...chnung_neue_attribute_fuer_begruendung.php | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 system/dbupdate_3.4/30181_tabelle_anrechnung_neue_attribute_fuer_begruendung.php diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index ed60aeddf..5c6a3d5d1 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -40,6 +40,7 @@ require_once('dbupdate_3.4/24913_tabelle_raumtyp_neues_attribut_aktiv.php'); require_once('dbupdate_3.4/28089_plausichecks_in_extension_hinzufuegen.php'); require_once('dbupdate_3.4/29133_einzelne_studiengaenge_aus_issuechecks_ausnehmen.php'); require_once('dbupdate_3.4/30537_anmerkung_in_tbl_rolleberechtigung.php'); +require_once('dbupdate_3.4/30181_tabelle_anrechnung_neue_attribute_fuer_begruendung.php'); // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; @@ -150,7 +151,7 @@ $tabellen=array( "lehre.tbl_abschlusspruefung" => array("abschlusspruefung_id","student_uid","vorsitz","pruefer1","pruefer2","pruefer3","abschlussbeurteilung_kurzbz","akadgrad_id","pruefungstyp_kurzbz","datum","uhrzeit","sponsion","anmerkung","updateamum","updatevon","insertamum","insertvon","ext_id","note","protokoll","endezeit","pruefungsantritt_kurzbz","freigabedatum"), "lehre.tbl_abschlusspruefung_antritt" => array("pruefungsantritt_kurzbz","bezeichnung","bezeichnung_english","sort"), "lehre.tbl_akadgrad" => array("akadgrad_id","akadgrad_kurzbz","studiengang_kz","titel","geschlecht"), - "lehre.tbl_anrechnung" => array("anrechnung_id","prestudent_id","lehrveranstaltung_id","begruendung_id","lehrveranstaltung_id_kompatibel","genehmigt_von","insertamum","insertvon","updateamum","updatevon","ext_id", "dms_id", "studiensemester_kurzbz", "anmerkung_student", "empfehlung_anrechnung"), + "lehre.tbl_anrechnung" => array("anrechnung_id","prestudent_id","lehrveranstaltung_id","begruendung_id","lehrveranstaltung_id_kompatibel","genehmigt_von","insertamum","insertvon","updateamum","updatevon","ext_id", "dms_id", "studiensemester_kurzbz", "anmerkung_student", "empfehlung_anrechnung", "begruendung_ects", "begruendung_lvinhalt"), "lehre.tbl_anrechnungstatus" => array("status_kurzbz", "bezeichnung_mehrsprachig"), "lehre.tbl_anrechnung_anrechnungstatus" => array("anrechnungstatus_id", "anrechnung_id", "status_kurzbz", "datum", "insertamum", "insertvon"), "lehre.tbl_anrechnung_begruendung" => array("begruendung_id","bezeichnung"), diff --git a/system/dbupdate_3.4/30181_tabelle_anrechnung_neue_attribute_fuer_begruendung.php b/system/dbupdate_3.4/30181_tabelle_anrechnung_neue_attribute_fuer_begruendung.php new file mode 100644 index 000000000..922920071 --- /dev/null +++ b/system/dbupdate_3.4/30181_tabelle_anrechnung_neue_attribute_fuer_begruendung.php @@ -0,0 +1,28 @@ +db_query("SELECT begruendung_ects FROM lehre.tbl_anrechnung LIMIT 1")) +{ + $qry = "ALTER TABLE lehre.tbl_anrechnung ADD COLUMN begruendung_ects text; + COMMENT ON COLUMN lehre.tbl_anrechnung.begruendung_ects IS 'Begruendung gleichwertiger ECTS'; + "; + + if(!$db->db_query($qry)) + echo 'lehre.tbl_anrechnung '.$db->db_last_error().'
'; + else + echo '
Spalte begruendung_ects zu Tabelle lehre.tbl_anrechnung hinzugefügt'; +} + +//Add column begruendung_lvinhalt to lehre.tbl_anrechnung +if(!@$db->db_query("SELECT begruendung_lvinhalt FROM lehre.tbl_anrechnung LIMIT 1")) +{ + $qry = "ALTER TABLE lehre.tbl_anrechnung ADD COLUMN begruendung_lvinhalt text; + COMMENT ON COLUMN lehre.tbl_anrechnung.begruendung_lvinhalt IS 'Begruendung gleichwertiger LV-Inhalte'; + "; + + if(!$db->db_query($qry)) + echo 'lehre.tbl_anrechnung '.$db->db_last_error().'
'; + else + echo '
Spalte begruendung_lvinhalt zu Tabelle lehre.tbl_anrechnung hinzugefügt'; +} \ No newline at end of file From 54d819e1eaf1dc8d96b5f2ccfb22307d36b7c67b Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 20 Jul 2023 13:38:52 +0200 Subject: [PATCH 21/30] Adapted GUI to display and save begruendung_ects and begruendung_lvinhalt --- .../lehre/anrechnung/requestAnrechnung.php | 49 +++++++++++++++++-- .../js/lehre/anrechnung/requestAnrechnung.js | 25 ++++++++-- 2 files changed, 66 insertions(+), 8 deletions(-) diff --git a/application/views/lehre/anrechnung/requestAnrechnung.php b/application/views/lehre/anrechnung/requestAnrechnung.php index cfd9058f5..839e659a8 100644 --- a/application/views/lehre/anrechnung/requestAnrechnung.php +++ b/application/views/lehre/anrechnung/requestAnrechnung.php @@ -1,5 +1,7 @@ load->view( 'templates/FHC-Header', @@ -197,6 +199,47 @@ $this->load->view( + +
+
+
+
+ p->t('anrechnung', 'begruendungEcts'); ?>  + + + + ECTS Berechnung Referenzbeispiele +
+
+ + p->t('ui', 'maxZeichen'); ?> : +
+
+
+
+ +
+
+
+
+ p->t('anrechnung', 'begruendungLvinhalt'); ?>  + + + +
+
+ +  / p->t('ui', 'maxZeichen'); ?> : + p->t('ui', 'fehlendeMinZeichen'); ?> : +
+
+
+
@@ -242,8 +285,8 @@ $this->load->view(
- p->t('ui', 'maxZeichen'); ?> : + maxlength="" required>anmerkung; ?> + p->t('ui', 'maxZeichen'); ?> :
diff --git a/public/js/lehre/anrechnung/requestAnrechnung.js b/public/js/lehre/anrechnung/requestAnrechnung.js index 5edb4e162..01453f52d 100644 --- a/public/js/lehre/anrechnung/requestAnrechnung.js +++ b/public/js/lehre/anrechnung/requestAnrechnung.js @@ -1,6 +1,8 @@ const ANRECHNUNGSTATUS_APPROVED = 'approved'; const ANRECHNUNGSTATUS_REJECTED = 'rejected'; -const HERKUNFT_DER_KENNTNISSE_MAX_LENGTH = 125; +const CHAR_LENGTH125 = 125; +const CHAR_LENGTH500 = 500; +const CHAR_LENGTH1500 = 1500; const COLOR_DANGER = '#f2dede'; @@ -25,7 +27,7 @@ $(function(){ // Alert message inside Begruendungsbox, if maximum ECTS exceeded requestAnrechnung.alertIfMaxEctsExceededInsideBegruendungsbox(); - // Set chars counter for textarea 'Herkunft der Kenntnisse' + // Set chars counter for textareas requestAnrechnung.setCharsCounter(); // If Sperregrund exists: display Sperre panel, hide Status panel and disable all form elements @@ -98,6 +100,8 @@ $(function(){ begruendung: this.begruendung.value, lv_id: this.lv_id.value, studiensemester: this.studiensemester.value, + begruendung_ects: this.begruendung_ects.value, + begruendung_lvinhalt: this.begruendung_lvinhalt.value, bestaetigung: this.bestaetigung.value, uploadfile: this.uploadfile.files }, @@ -207,11 +211,22 @@ var requestAnrechnung = { }, setCharsCounter: function(){ $('#requestAnrechnung-herkunftDerKenntnisse').keyup(function() { - - let length = HERKUNFT_DER_KENNTNISSE_MAX_LENGTH - $(this).val().length; - + let length = CHAR_LENGTH125 - $(this).val().length; $('#requestAnrechnung-herkunftDerKenntnisse-charCounter').text(length); }); + + $('#requestAnrechnung-begruendungEcts').keyup(function() { + let length = CHAR_LENGTH125 - $(this).val().length; + $('#requestAnrechnung-begruendungEcts-charCounter').text(length); + }); + + $('#requestAnrechnung-begruendungLvinhalt').keyup(function() { + let maxlength = CHAR_LENGTH1500 - $(this).val().length; + $('#requestAnrechnung-begruendungLvinhalt-charCounterMax').text(maxlength); + + let minlength = CHAR_LENGTH500 - $(this).val().length; + $('#requestAnrechnung-begruendungLvinhalt-charCounterMin').text(minlength); + }); }, formatAnrechnungIsApplied: function (antragdatum, dms_id, filename){ $('#requestAnrechnung-antragdatum').text(antragdatum); From 110d6bace3637d2783f83be301ac86991b3d83b2 Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 20 Jul 2023 13:42:53 +0200 Subject: [PATCH 22/30] Adapted backend logic to save/retrieve begruendung_ects and begruendung_lvinhalt --- .../controllers/lehre/anrechnung/RequestAnrechnung.php | 10 ++++++++-- application/libraries/AnrechnungLib.php | 4 ++++ application/models/education/Anrechnung_model.php | 4 +++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php index e9059720b..1922bacda 100644 --- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php +++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php @@ -111,6 +111,8 @@ class requestAnrechnung extends Auth_Controller $lehrveranstaltung_id = $this->input->post('lv_id'); $studiensemester_kurzbz = $this->input->post('studiensemester'); $bestaetigung = $this->input->post('bestaetigung'); + $begruendung_ects = $this->input->post('begruendung_ects'); + $begruendung_lvinhalt = $this->input->post('begruendung_lvinhalt'); // Validate data if (empty($_FILES['uploadfile']['name'])) @@ -121,7 +123,9 @@ class requestAnrechnung extends Auth_Controller if (isEmptyString($begruendung_id) || isEmptyString($anmerkung) || isEmptyString($lehrveranstaltung_id) || - isEmptyString($studiensemester_kurzbz)) + isEmptyString($studiensemester_kurzbz) || + isEmptyString($begruendung_ects) || + isEmptyString($begruendung_lvinhalt)) { return $this->outputJsonError($this->p->t('ui', 'errorFelderFehlen')); } @@ -172,7 +176,9 @@ class requestAnrechnung extends Auth_Controller $lehrveranstaltung_id, $begruendung_id, $lastInsert_dms_id, - $anmerkung + $anmerkung, + $begruendung_ects, + $begruendung_lvinhalt ); if (isError($result)) diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php index d8c4b1fd3..8ee1891b5 100644 --- a/application/libraries/AnrechnungLib.php +++ b/application/libraries/AnrechnungLib.php @@ -174,6 +174,8 @@ class AnrechnungLib $anrechnung_data->insertvon = ''; $anrechnung_data->studiensemester_kurzbz = ''; $anrechnung_data->empfehlung = ''; + $anrechnung_data->begruendung_ects = ''; + $anrechnung_data->begruendung_lvinhalt = ''; $anrechnung_data->status_kurzbz = ''; $anrechnung_data->status = getUserLanguage() == 'German' ? 'neu' : 'new'; $anrechnung_data->dokumentname = ''; @@ -894,6 +896,8 @@ class AnrechnungLib $anrechnung_data->insertvon= $anrechnung->insertvon; $anrechnung_data->studiensemester_kurzbz= $anrechnung->studiensemester_kurzbz; $anrechnung_data->empfehlung= $anrechnung->empfehlung_anrechnung; + $anrechnung_data->begruendung_ects = $anrechnung->begruendung_ects; + $anrechnung_data->begruendung_lvinhalt = $anrechnung->begruendung_lvinhalt; // Get last status_kurzbz $result = $this->ci->AnrechnungModel->getLastAnrechnungstatus($anrechnung->anrechnung_id); diff --git a/application/models/education/Anrechnung_model.php b/application/models/education/Anrechnung_model.php index ebecf4118..cbfdb6607 100644 --- a/application/models/education/Anrechnung_model.php +++ b/application/models/education/Anrechnung_model.php @@ -30,7 +30,7 @@ class Anrechnung_model extends DB_Model */ public function createAnrechnungsantrag( $prestudent_id, $studiensemester_kurzbz, $lehrveranstaltung_id, - $begruendung_id, $dms_id, $anmerkung_student = null + $begruendung_id, $dms_id, $anmerkung_student = null, $begruendung_ects = null, $begruendung_lvinhalt = null ) { // Start DB transaction @@ -44,6 +44,8 @@ class Anrechnung_model extends DB_Model 'dms_id' => $dms_id, 'studiensemester_kurzbz' => $studiensemester_kurzbz, 'anmerkung_student' => $anmerkung_student, + 'begruendung_ects' => $begruendung_ects, + 'begruendung_lvinhalt' => $begruendung_lvinhalt, 'insertvon' => $this->_uid )); From 74b1ca06147bf89f2383916eec3b2711cb338971 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 24 Jul 2023 10:24:21 +0200 Subject: [PATCH 23/30] Added phrases for Begruendung ECTS and Begruendung LVinhalt --- system/phrasesupdate.php | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 28735e07f..6b0990b9f 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10908,6 +10908,46 @@ Any unusual occurrences 'insertvon' => 'system' ) ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'begruendungEcts', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Begründen Sie die Gleichwertigkeit der ECTS', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Give reasons for the equivalence of ECTS', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'begruendungLvinhalt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Begründen Sie die Gleichwertigkeit der Lehrveranstaltungsinhalte', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Give reasons for the equivalence of the course contents', + 'description' => '', + 'insertvon' => 'system' + ) + ) ), array( 'app' => 'core', @@ -13745,6 +13785,26 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'fehlendeMinZeichen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehlende min. Zeichen", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Missing min. Characters", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'anrechnung', From 096b436d546301f2af4d1c45c983eabfe2ec57e0 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 24 Jul 2023 10:24:21 +0200 Subject: [PATCH 24/30] Added phrases for Begruendung ECTS and Begruendung LVinhalt --- system/phrasesupdate.php | 100 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 28735e07f..74803092d 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10909,6 +10909,86 @@ Any unusual occurrences ) ) ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'begruendungEcts', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Begründen Sie die Gleichwertigkeit der ECTS', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Give reasons for the equivalence of ECTS', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'begruendungLvinhalt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Begründen Sie die Gleichwertigkeit der Lehrveranstaltungsinhalte', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Give reasons for the equivalence of the course contents', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'anrechnungBegruendungEctsTooltipText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Hinsichtlich des Umfangs der LV, die Sie anrechnen lassen wollen: Bitte erläutern Sie, warum Ihr Zeugnis bzw. Ihre berufliche Praxis mit dem Umfang der LV gleichwertig ist.

Referenzbeispiele für die ECTS-Berechnung finden Sie rechts in der Infobox.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Regarding the scope of the course you want to have credited: Please explain why your certificate or your professional practice is equivalent to the scope of the course.

Reference examples for the ECTS calculation can be found in the info box on the right.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'anrechnungBegruendungLvinhaltTooltipText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Hinsichtlich der Lernergebnisse der LV (vgl. CIS), die Sie anrechnen lassen wollen: Bitte erläutern Sie, warum die von Ihnen erworbenen Kompetenzen mit diesen Lernergebnissen gleichwertig sind.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'With regard to the learning outcomes of the course (cf. CIS) for which you want to receive credit: Please explain why the competences you have acquired are equivalent to these learning outcomes.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'anrechnung', @@ -13745,6 +13825,26 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'fehlendeMinZeichen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehlende min. Zeichen", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Missing min. Characters", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'anrechnung', From dd392caef73537804990afafcbd7bb95ca44bc67 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 31 Jul 2023 11:44:19 +0200 Subject: [PATCH 25/30] Adapted max/min length for Begruendung ECTS and Begruendung LVinhalt --- .../views/lehre/anrechnung/requestAnrechnung.php | 13 +++++++------ public/js/lehre/anrechnung/requestAnrechnung.js | 7 ++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/application/views/lehre/anrechnung/requestAnrechnung.php b/application/views/lehre/anrechnung/requestAnrechnung.php index 839e659a8..9e430a676 100644 --- a/application/views/lehre/anrechnung/requestAnrechnung.php +++ b/application/views/lehre/anrechnung/requestAnrechnung.php @@ -1,7 +1,8 @@ load->view( 'templates/FHC-Header', @@ -212,9 +213,9 @@ $this->load->view( ECTS Berechnung Referenzbeispiele
- - p->t('ui', 'maxZeichen'); ?> : + + p->t('ui', 'maxZeichen'); ?> :
@@ -233,8 +234,8 @@ $this->load->view(
-  / p->t('ui', 'maxZeichen'); ?> : + maxlength="" required>begruendung_lvinhalt; ?> +  / p->t('ui', 'maxZeichen'); ?> : p->t('ui', 'fehlendeMinZeichen'); ?> :
diff --git a/public/js/lehre/anrechnung/requestAnrechnung.js b/public/js/lehre/anrechnung/requestAnrechnung.js index 01453f52d..2947aebe9 100644 --- a/public/js/lehre/anrechnung/requestAnrechnung.js +++ b/public/js/lehre/anrechnung/requestAnrechnung.js @@ -1,8 +1,9 @@ const ANRECHNUNGSTATUS_APPROVED = 'approved'; const ANRECHNUNGSTATUS_REJECTED = 'rejected'; const CHAR_LENGTH125 = 125; +const CHAR_LENGTH150 = 150; const CHAR_LENGTH500 = 500; -const CHAR_LENGTH1500 = 1500; +const CHAR_LENGTH1000 = 1000; const COLOR_DANGER = '#f2dede'; @@ -216,12 +217,12 @@ var requestAnrechnung = { }); $('#requestAnrechnung-begruendungEcts').keyup(function() { - let length = CHAR_LENGTH125 - $(this).val().length; + let length = CHAR_LENGTH150 - $(this).val().length; $('#requestAnrechnung-begruendungEcts-charCounter').text(length); }); $('#requestAnrechnung-begruendungLvinhalt').keyup(function() { - let maxlength = CHAR_LENGTH1500 - $(this).val().length; + let maxlength = CHAR_LENGTH1000 - $(this).val().length; $('#requestAnrechnung-begruendungLvinhalt-charCounterMax').text(maxlength); let minlength = CHAR_LENGTH500 - $(this).val().length; From 83bf874156bdf409a95bedd983412cfb62d8cf8c Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 31 Jul 2023 12:48:56 +0200 Subject: [PATCH 26/30] Removed link 'ECTS Berechnung Referenzbeispiele' --- application/views/lehre/anrechnung/requestAnrechnung.php | 1 - 1 file changed, 1 deletion(-) diff --git a/application/views/lehre/anrechnung/requestAnrechnung.php b/application/views/lehre/anrechnung/requestAnrechnung.php index 9e430a676..18fd66a67 100644 --- a/application/views/lehre/anrechnung/requestAnrechnung.php +++ b/application/views/lehre/anrechnung/requestAnrechnung.php @@ -210,7 +210,6 @@ $this->load->view( title="p->t('anrechnung', 'anrechnungBegruendungEctsTooltipText'); ?>"> - ECTS Berechnung Referenzbeispiele