diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteeintragen.php b/cis/private/lehre/benotungstool/lvgesamtnoteeintragen.php index 3c9985a8b..73d0e6fca 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteeintragen.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteeintragen.php @@ -233,12 +233,21 @@ if (isset($_REQUEST["submit"])) continue; } $punkte=str_replace(',','.', $punkte); - //UID ermitteln + + //check ob statt Matrikelnummer nicht bereits student_uid (Moodle Grade Import) vorliegt.. $student = new student(); - if(!$student_uid = $student->getUidFromMatrikelnummer($matrikelnummer)) + if (!$student->checkIfValidStudentUID($matrikelnummer)) { - $response.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($matrikelnummer)); - continue; + //UID ermitteln + if(!$student_uid = $student->getUidFromMatrikelnummer($matrikelnummer)) + { + $response.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($matrikelnummer)); + continue; + } + } + else + { + $student_uid = $matrikelnummer; } // Hole Zeugnisnote wenn schon eine eingetragen ist diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index 3ff1f4695..916f2b4e3 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -803,6 +803,7 @@ 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 diff --git a/include/student.class.php b/include/student.class.php index 55733dd94..cfea879a9 100644 --- a/include/student.class.php +++ b/include/student.class.php @@ -531,6 +531,33 @@ class student extends benutzer } } + /** + * Check, ob inputparameter gültige studenten_id ist + * @param matrikelnummer oder student_uid + * @return ok, wenn gültige Id, sonst false + */ + public function checkIfValidStudentUID($uid) + { + $qry = "SELECT student_uid FROM public.tbl_student WHERE student_uid=".$this->db_add_param($uid); + + if($this->db_query($qry)) + { + if($row = $this->db_fetch_object()) + { + return true; + } + else + { + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + /** * Laedt die UID anhand der Matrikelnummer * @param matrikelnummer diff --git a/locale/de-AT/benotungstool.php b/locale/de-AT/benotungstool.php index e8ef6d8d6..3c8063936 100644 --- a/locale/de-AT/benotungstool.php +++ b/locale/de-AT/benotungstool.php @@ -170,7 +170,7 @@ $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 und fügen Sie diese in folgendes Feld ein'; +$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/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 94b0e7891..17f78d2ba 100644 --- a/locale/en-US/benotungstool.php +++ b/locale/en-US/benotungstool.php @@ -169,7 +169,7 @@ $this->phrasen['benotungstool/eingetrageneNoten']='Submitted Grades'; $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 and insert them in the following field'; +$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/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"';