From 3e056ebf3d35c6eacae1fd042e9358c3925c532c Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 24 Mar 2023 15:21:01 +0100 Subject: [PATCH] =?UTF-8?q?Notenimport=20Nachpr=C3=BCfung=20und=203.Termin?= =?UTF-8?q?:=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