diff --git a/application/controllers/api/frontend/v1/stv/Pruefung.php b/application/controllers/api/frontend/v1/stv/Pruefung.php index 7ea8cc95c..e205c85b8 100644 --- a/application/controllers/api/frontend/v1/stv/Pruefung.php +++ b/application/controllers/api/frontend/v1/stv/Pruefung.php @@ -465,8 +465,6 @@ class Pruefung extends FHCAPI_Controller { $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); - //return $this->terminateWithError($semester_kurzbz, self::ERROR_TYPE_GENERAL); - $result = $this->LehrveranstaltungModel->getLvsByStudent($student_uid, $semester_kurzbz); $data = $this->getDataOrTerminateWithError($result); @@ -482,7 +480,7 @@ class Pruefung extends FHCAPI_Controller foreach ($lv_ids as $id) { - $result = $this->LehreinheitModel->getLesFromLvIds($id); + $result = $this->LehreinheitModel->getLesFromLvIds($id, $semester_kurzbz); $data = $this->getDataOrTerminateWithError($result); if (is_array($data)) { diff --git a/application/models/education/Lehreinheit_model.php b/application/models/education/Lehreinheit_model.php index 5303da5a6..d4bc7a22f 100644 --- a/application/models/education/Lehreinheit_model.php +++ b/application/models/education/Lehreinheit_model.php @@ -264,14 +264,13 @@ EOSQL; lv.kurzbz, lv.bezeichnung, lv.semester, - ma.mitarbeiter_uid, ( SELECT STRING_AGG(CONCAT(leg.semester, leg.verband, leg.gruppe), ' ') FROM lehre.tbl_lehreinheitgruppe leg WHERE leg.lehreinheit_id = le.lehreinheit_id ) AS gruppe, - tma.kurzbz as kuerzel + STRING_AGG(tma.kurzbz, ' ') as kuerzel FROM lehre.tbl_lehreinheit le JOIN @@ -291,6 +290,13 @@ EOSQL; } $query .=" + GROUP BY + lv.lehrveranstaltung_id, + le.lehreinheit_id, + le.lehrform_kurzbz, + lv.kurzbz, + lv.bezeichnung, + lv.semester ORDER BY le.lehreinheit_id; "; diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index 6a8437622..0a48965b5 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -522,11 +522,8 @@ class Lehrveranstaltung_model extends DB_Model */ public function getLvsByStudent($student_uid, $studiensemester_kurzbz = null) { - // $studiensemester_kurzbz = 'WS2024'; - //$studiensemester_kurzbz = null; - $params = array($student_uid); - $qry = "SELECT DISTINCT * FROM lehre.tbl_lehrveranstaltung + $qry = "SELECT * FROM lehre.tbl_lehrveranstaltung WHERE lehrveranstaltung_id IN( SELECT lehrveranstaltung_id FROM campus.vw_student_lehrveranstaltung WHERE uid=?";