diff --git a/vilesci/stammdaten/reihungstestverwaltung.php b/vilesci/stammdaten/reihungstestverwaltung.php index 63e8d3142..830554753 100644 --- a/vilesci/stammdaten/reihungstestverwaltung.php +++ b/vilesci/stammdaten/reihungstestverwaltung.php @@ -291,9 +291,9 @@ if(isset($_GET['excel'])) // Wenn Daten vorhanden if ($db->db_num_rows($result) > 0) { - while($row = $db->db_fetch_object($result)) - { - if ($ort_kurzbz == '0' || $ort_kurzbz != $row->ort_kurzbz) + while($row = $db->db_fetch_object($result)) + { + if ($ort_kurzbz == '0' || $ort_kurzbz != $row->ort_kurzbz) { // Creating a worksheet if ($row->ort_kurzbz=='') @@ -363,34 +363,34 @@ if(isset($_GET['excel'])) $rt_prestudent_arr = array(); //Daten ermitteln für Spalte absolvierte Verfahren - $qry_absolvierte_Verfahren = "SELECT - distinct tbl_reihungstest.reihungstest_id, + $qry_absolvierte_Verfahren = "SELECT + distinct tbl_reihungstest.reihungstest_id, tbl_pruefling.pruefling_id, tbl_prestudent.prestudent_id, tbl_rt_person.person_id - FROM - public.tbl_rt_person - JOIN lehre.tbl_studienplan USING(studienplan_id) - JOIN lehre.tbl_studienordnung USING(studienordnung_id) - JOIN public.tbl_prestudent USING(person_id) - JOIN public.tbl_prestudentstatus USING(studienplan_id, prestudent_id) - JOIN public.tbl_reihungstest ON(tbl_reihungstest.reihungstest_id=tbl_rt_person.rt_id) - LEFT JOIN testtool.tbl_pruefling using(prestudent_id) WHERE + FROM + public.tbl_rt_person + JOIN lehre.tbl_studienplan USING(studienplan_id) + JOIN lehre.tbl_studienordnung USING(studienordnung_id) + JOIN public.tbl_prestudent USING(person_id) + JOIN public.tbl_prestudentstatus USING(studienplan_id, prestudent_id) + JOIN public.tbl_reihungstest ON(tbl_reihungstest.reihungstest_id=tbl_rt_person.rt_id) + LEFT JOIN testtool.tbl_pruefling using(prestudent_id) WHERE (tbl_rt_person.anmeldedatum is null OR tbl_rt_person.anmeldedatum<=tbl_reihungstest.datum) AND tbl_reihungstest.datum >=(SELECT min(begintime)::date FROM testtool.tbl_pruefling_frage WHERE pruefling_id=tbl_pruefling.pruefling_id AND tbl_reihungstest.datum>=begintime-'1 days'::interval) AND (tbl_reihungstest.stufe is null or tbl_reihungstest.stufe=1) AND person_id=".$db->db_add_param($row->person_id, FHC_INTEGER); - + if($result_rt_prestudent = $db->db_query($qry_absolvierte_Verfahren)) - { + { while($obj = $db->db_fetch_object($result_rt_prestudent)) - { - array_push($rt_prestudent_arr, $obj); + { + array_push($rt_prestudent_arr, $obj); } } foreach($rt_prestudent_arr as $item) { - $pruefling->getPruefling($item->prestudent_id); + $pruefling->getPruefling($item->prestudent_id); $rt = new Reihungstest(); $rt->load($item->reihungstest_id); $rt_letztes_login = $datum_obj->formatDatum($pruefling->registriert, 'Y-m-d'); @@ -413,7 +413,7 @@ if(isset($_GET['excel'])) } } } - } + } $weitere_zuteilungen = array(); $qry_zuteilungen = " @@ -553,14 +553,20 @@ if(isset($_GET['excel'])) Reihungstest - + + + + + + + - - + + - - + +