From 439ae5113d87d9e4b76bd76f83dbf8d5333ed8ac Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Tue, 15 Oct 2024 13:59:11 +0200 Subject: [PATCH 1/2] =?UTF-8?q?fix=20unterbrechung=20erstellen=20nicht=20m?= =?UTF-8?q?=C3=B6glich=20wenn=20ein=20abgelehnter=20unterbrechungsantrag?= =?UTF-8?q?=20existiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/models/education/Studierendenantrag_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/education/Studierendenantrag_model.php b/application/models/education/Studierendenantrag_model.php index 43edb2449..b7c0667cb 100644 --- a/application/models/education/Studierendenantrag_model.php +++ b/application/models/education/Studierendenantrag_model.php @@ -355,7 +355,7 @@ class Studierendenantrag_model extends DB_Model $this->db->where([ 'prestudent_id' => $prestudent_id, 'typ' => Studierendenantrag_model::TYP_UNTERBRECHUNG, - 'campus.get_status_studierendenantrag(studierendenantrag_id) !=' => Studierendenantragstatus_model::STATUS_CANCELLED, + 'campus.get_status_studierendenantrag(studierendenantrag_id) NOT IN (\'' . Studierendenantragstatus_model::STATUS_CANCELLED . '\', \'' . Studierendenantragstatus_model::STATUS_REJECTED . '\')' => null, 'start < ' . $end => null, 'datum_wiedereinstieg > ' . $start => null, ]); From 24ce443e95d7265a7fcb56186f11cf30dca3f0b7 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Tue, 15 Oct 2024 17:40:11 +0200 Subject: [PATCH 2/2] nur die letzte komm oder zusaetzlichen komm Pruefung einer LV beruecksichtigen --- application/models/education/Pruefung_model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/models/education/Pruefung_model.php b/application/models/education/Pruefung_model.php index 214d6519f..409c0b733 100644 --- a/application/models/education/Pruefung_model.php +++ b/application/models/education/Pruefung_model.php @@ -175,6 +175,8 @@ class Pruefung_model extends DB_Model $this->addSelect('campus.get_status_studierendenantrag(a.studierendenantrag_id) status'); $this->addSelect('pss.ausbildungssemester'); + $this->addJoin('(SELECT MAX(datum) AS datum, lehreinheit_id AS le_id, student_uid AS stud_uid FROM lehre.tbl_pruefung p WHERE pruefungstyp_kurzbz IN (\'kommPruef\', \'zusKommPruef\') GROUP BY lehreinheit_id, student_uid) lpd', + 'p.datum = lpd.datum AND p.lehreinheit_id = lpd.le_id AND p.student_uid = lpd.stud_uid'); $this->addJoin('lehre.tbl_lehreinheit le', 'lehreinheit_id'); $this->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id'); $this->addJoin('public.tbl_student s', 'student_uid');