From 4e33514787f8526d12b0cc6b4985575138855eb6 Mon Sep 17 00:00:00 2001 From: oesi Date: Thu, 2 Feb 2017 16:34:56 +0100 Subject: [PATCH] =?UTF-8?q?Fehler=20behoben=20bei=20dem=20es=20Vorkommen?= =?UTF-8?q?=20konnte=20das=20der=20gew=C3=A4hlte=20Reihungstest=20beim=20E?= =?UTF-8?q?ditieren=20nicht=20im=20DropDown=20enthalten=20war?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/student/aufnahmetermine.js.php | 1 - include/reihungstest.class.php | 12 +++++++++--- rdf/reihungstest.rdf.php | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/content/student/aufnahmetermine.js.php b/content/student/aufnahmetermine.js.php index 13d8605d2..64ff2c26e 100644 --- a/content/student/aufnahmetermine.js.php +++ b/content/student/aufnahmetermine.js.php @@ -37,7 +37,6 @@ function loadAufnahmeTermine(prestudent_id) document.getElementById('aufnahmetermine-button-savegesamtpunkte').disabled=false; document.getElementById('aufnahmetermine-button-calculatetotal').disabled=false; - // Gruppen DropDown laden var aufnahmegruppemenulist = document.getElementById('aufnahmetermine-menulist-aufnahmegruppe'); if(aufnahmegruppemenulist) diff --git a/include/reihungstest.class.php b/include/reihungstest.class.php index 93c215f37..36fe00886 100644 --- a/include/reihungstest.class.php +++ b/include/reihungstest.class.php @@ -971,9 +971,10 @@ class reihungstest extends basis_db * Liefert alle Reihungstests zu den uebergebenen StudienplanIDs * * @param array $studienplan_arr Array mit StudienplanIDs zu denen die RT geladen werden sollen. + * @param array $include_ids Array mit ReihungstestIDs die zusaetzlich geladen werden sollen. * @return boolean true wenn erfolgreich, false im Fehlerfall. */ - public function getReihungstestStudienplan($studienplan_arr) + public function getReihungstestStudienplan($studienplan_arr, $include_ids=null) { $qry = "SELECT distinct a.*, @@ -984,8 +985,13 @@ class reihungstest extends basis_db FROM public.tbl_reihungstest a JOIN public.tbl_rt_studienplan USING(reihungstest_id) - WHERE studienplan_id IN(".$this->db_implode4Sql($studienplan_arr).") - ORDER BY a.datum DESC"; + WHERE studienplan_id IN(".$this->db_implode4Sql($studienplan_arr).")"; + + if(!is_null($include_ids) && is_array($include_ids) && count($include_ids)>0) + { + $qry .=" OR reihungstest_id in(".$this->db_implode4SQL($include_ids).")"; + } + $qry.=" ORDER BY a.datum DESC"; if ($this->db_query($qry)) { diff --git a/rdf/reihungstest.rdf.php b/rdf/reihungstest.rdf.php index d5e6a2fb2..b3c0a4c43 100644 --- a/rdf/reihungstest.rdf.php +++ b/rdf/reihungstest.rdf.php @@ -96,9 +96,10 @@ elseif(isset($_GET['prestudent_id'])) foreach($rt_help->result as $row) { $studienplan_arr[] = $row->studienplan_id; + $include_ids[] = $row->reihungstest_id; } - $rt->getReihungstestStudienplan($studienplan_arr); + $rt->getReihungstestStudienplan($studienplan_arr, $include_ids); } else $rt->getAll();