From 51c4e1f92b84d824b7b2de0f3e1c4e95e4d459e4 Mon Sep 17 00:00:00 2001 From: Nikolaus Krondraf Date: Fri, 25 Sep 2020 13:00:41 +0200 Subject: [PATCH] =?UTF-8?q?zeige=20keine=20Pr=C3=BCfungstermine=20wo=20pos?= =?UTF-8?q?itive=20Note=20vorhanden=20ist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/pruefungCis.class.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/include/pruefungCis.class.php b/include/pruefungCis.class.php index 3439793da..ec402ed5d 100644 --- a/include/pruefungCis.class.php +++ b/include/pruefungCis.class.php @@ -616,12 +616,19 @@ class pruefungCis extends basis_db if ($uid !== null) { - // LVs entfernen wo schon eine Note für UID vorhanden ist + // LVs entfernen wo schon eine positive Note für UID vorhanden ist $qry .= " AND lehrveranstaltung_id NOT IN ( - SELECT lehrveranstaltung_id - FROM lehre.tbl_pruefung - JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) - WHERE student_uid = " . $this->db_add_param($uid) . ");"; + SELECT lehrveranstaltung_id + FROM lehre.tbl_pruefung + JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) + WHERE student_uid = " . $this->db_add_param($uid) . " + AND note NOT IN (5, 7, 9, 11, 13, 14) + UNION + SELECT lehrveranstaltung_id + FROM lehre.tbl_zeugnisnote + WHERE student_uid = " . $this->db_add_param($uid) . " + AND note NOT IN (5, 7, 9, 11, 13, 14) + );"; } if($this->db_query($qry))