From 46855c9547b033573dd37a7709c2111c8fa86244 Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Thu, 9 Nov 2023 13:37:56 +0100 Subject: [PATCH] =?UTF-8?q?Blacklist=20f=C3=BCr=20Noten?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/config/studierendenantrag.php | 8 ++++++++ application/models/education/Pruefung_model.php | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/application/config/studierendenantrag.php b/application/config/studierendenantrag.php index c5ebc0d80..3f28e5d50 100644 --- a/application/config/studierendenantrag.php +++ b/application/config/studierendenantrag.php @@ -159,3 +159,11 @@ $config['stgkz_blacklist_unterbrechung'] = []; * @var array An array of tbl_studiengang.studiengang_kz's */ $config['stgkz_blacklist_wiederholung'] = []; + +/** + * Blacklisted noten for negative committee exams + * noten with this ids won't be seen as negative + * + * @var array An array of noten ids + */ +$config['note_blacklist_wiederholung'] = []; diff --git a/application/models/education/Pruefung_model.php b/application/models/education/Pruefung_model.php index 644b346ed..ef7cfc967 100644 --- a/application/models/education/Pruefung_model.php +++ b/application/models/education/Pruefung_model.php @@ -125,6 +125,8 @@ class Pruefung_model extends DB_Model */ public function loadWhereCommitteeExamsFailed() { + $this->load->config('studierendenantrag'); + $this->dbTable = 'lehre.tbl_pruefung p'; $this->addSelect('p.datum'); @@ -132,6 +134,9 @@ class Pruefung_model extends DB_Model $this->addJoin('lehre.tbl_note n', 'note'); $this->db->where("n.positiv", false); + $note_blacklist = $this->config->item('note_blacklist_wiederholung'); + if ($note_blacklist) + $this->db->where_not_in("n.note", $note_blacklist); $this->db->where_in("p.pruefungstyp_kurzbz", ['kommPruef','zusKommPruef']); return $this->load();