From ca51fef7f815948dae3919982597623a3139ecf1 Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 17 Feb 2022 12:33:38 +0100 Subject: [PATCH] Added method to get actual Studiensemester to Studiensemester Model --- .../models/organisation/Studiensemester_model.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/application/models/organisation/Studiensemester_model.php b/application/models/organisation/Studiensemester_model.php index 742757513..e7a3d77b1 100644 --- a/application/models/organisation/Studiensemester_model.php +++ b/application/models/organisation/Studiensemester_model.php @@ -13,6 +13,20 @@ class Studiensemester_model extends DB_Model $this->hasSequence = false; } + /** + * Get actual Studiensemester. + * + * @return array + */ + public function getAkt() + { + return $this->loadWhere(array( + 'start <= ' => 'NOW()', + 'ende >= ' => 'NOW()' + ) + ); + } + // Get next study semester public function getNext() {