diff --git a/content/bindings.xml.php b/content/bindings.xml.php index 7938af7f7..8db05bba4 100644 --- a/content/bindings.xml.php +++ b/content/bindings.xml.php @@ -11,24 +11,43 @@ - + - + - return val; + + + + + + return false; + + + + + document.getAnonymousNodes(this)[0].disabled = val; diff --git a/content/functions.js.php b/content/functions.js.php index 858ffec94..273504402 100644 --- a/content/functions.js.php +++ b/content/functions.js.php @@ -117,4 +117,26 @@ function CheckDatum(datum) return true; else return false; +} + +// **** +// * Wandelt ein Datum ins ISO Format um +// * aus 31.2.2007 wird 2007-02-31 +// **** +function ConvertDateToISO(datum) +{ + if(datum!='') + { + arr = datum.split('.'); + + if(arr[0].length==1) + arr[0]='0'+arr[0]; + + if(arr[1].length==1) + arr[1]='0'+arr[1]; + + return arr[2]+'-'+arr[1]+'-'+arr[0]; + } + else + return ''; } \ No newline at end of file diff --git a/content/student/studentDBDML.php b/content/student/studentDBDML.php index 340fc9bf5..1d89e4700 100644 --- a/content/student/studentDBDML.php +++ b/content/student/studentDBDML.php @@ -46,6 +46,8 @@ require_once('../../include/studiensemester.class.php'); require_once('../../include/betriebsmittel.class.php'); require_once('../../include/betriebsmittelperson.class.php'); require_once('../../include/bisio.class.php'); +require_once('../../include/zeugnisnote.class.php'); +require_once('../../include/lvgesamtnote.class.php'); $user = get_uid(); @@ -1093,6 +1095,99 @@ if(!$error) } } } + elseif(isset($_POST['type']) && $_POST['type']=='savenote') + { + //Speichert einen Noteneintrag + + $noten = new zeugnisnote($conn); + + if(isset($_POST['lehrveranstaltung_id']) && isset($_POST['student_uid']) && isset($_POST['studiensemester_kurzbz'])) + { + if($noten->load($_POST['lehrveranstaltung_id'], $_POST['student_uid'], $_POST['studiensemester_kurzbz'])) + { + $noten->new = false; + $noten->updateamum = date('Y-m-d H:i:s'); + $noten->updatevon = $user; + } + else + { + $noten->new = true; + $noten->insertamum = date('Y-m-d H:i:s'); + $noten->insertvon = $user; + } + + $noten->lehrveranstaltung_id = $_POST['lehrveranstaltung_id']; + $noten->student_uid = $_POST['student_uid']; + $noten->studiensemester_kurzbz = $_POST['studiensemester_kurzbz']; + $noten->benotungsdatum = date('Y-m-d H:i:s'); + $noten->note = $_POST['note']; + + if($noten->save()) + { + $return = true; + } + else + { + $errormsg = $noten->errormsg; + $return = false; + } + } + else + { + $return = false; + $errormsg = 'Fehlerhafte Parameteruebergabe'; + } + } + elseif(isset($_POST['type']) && $_POST['type']=='movenote') + { + //Speichert einen LVGesamtNoten Eintrag in die Tbl Zeugnisnote + //Die Daten werden per POST uebermittelt. Es wird ein Feld Anzahl mituebergeben + //mit der Anzahl der Felder. Die Felder sind durchnummeriert zB lehreinheit_id_0, lehreinheit_id_1, ... + $errormsg = ''; + + for($i=0;$i<$_POST['anzahl'];$i++) + { + $lvgesamtnote = new lvgesamtnote($conn); + $zeugnisnote = new zeugnisnote($conn); + + if($lvgesamtnote->load($_POST['lehrveranstaltung_id_'.$i], $_POST['student_uid_'.$i], $_POST['studiensemester_kurzbz_'.$i])) + { + if($zeugnisnote->load($_POST['lehrveranstaltung_id_'.$i], $_POST['student_uid_'.$i], $_POST['studiensemester_kurzbz_'.$i])) + { + $zeugnisnote->new = false; + $zeugnisnote->updateamum = date('Y-m-d H:i:s'); + $zeugnisnote->updatevon = $user; + } + else + { + $zeugnisnote->new = true; + $zeugnisnote->insertamum = date('Y-m-d H:i:s'); + $zeugnisnote->insertvon = $user; + $zeugnisnote->lehrveranstaltung_id = $_POST['lehrveranstaltung_id_'.$i]; + $zeugnisnote->student_uid = $_POST['student_uid_'.$i]; + $zeugnisnote->studiensemester_kurzbz = $_POST['studiensemester_kurzbz_'.$i]; + } + + $zeugnisnote->note = $lvgesamtnote->note; + $zeugnisnote->uebernahmedatum = date('Y-m-d H:i:s'); + $zeugnisnote->benotungsdatum = $lvgesamtnote->benotungsdatum; + $zeugnisnote->bemerkung = $lvgesamtnote->bemerkung; + + if(!$zeugnisnote->save()) + { + $errormsg .= "\n".$zeugnisnote->errormsg; + } + } + else + { + $errormsg .= "\nLvGesamtNote wurde nicht gefunden"; + } + } + if($errormsg=='') + $return = true; + else + $return = false; + } else { $return = false; diff --git a/content/student/studentbetriebsmitteloverlay.xul.php b/content/student/studentbetriebsmitteloverlay.xul.php index 4e029417f..62795e46f 100644 --- a/content/student/studentbetriebsmitteloverlay.xul.php +++ b/content/student/studentbetriebsmitteloverlay.xul.php @@ -77,11 +77,11 @@ echo '';