From 540fc4bede933b704d2d69aeb0325bcc0da780c0 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 15 Nov 2022 11:22:47 +0100 Subject: [PATCH] 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';