From 2c86315f42093c1b92c48c6f91f60693eb0cab24 Mon Sep 17 00:00:00 2001 From: bison Date: Thu, 25 Aug 2016 10:29:15 +0200 Subject: [PATCH] Method getStudiengangStudienplan is now returning all fields of table tbl_studienplan --- .../api/v1/organisation/Studiengang2.php | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/application/controllers/api/v1/organisation/Studiengang2.php b/application/controllers/api/v1/organisation/Studiengang2.php index 5fb6d8683..cb6606585 100644 --- a/application/controllers/api/v1/organisation/Studiengang2.php +++ b/application/controllers/api/v1/organisation/Studiengang2.php @@ -86,7 +86,24 @@ class Studiengang2 extends APIv1_Controller $this->StudiengangModel->addSelect( "public.tbl_studiengang.*, '' as " . Studiengang2::$PROPERTIES_SEPARATOR . ", - lehre.tbl_studienplan.*" + lehre.tbl_studienplan.studienplan_id as tbl_sp_studienplan_id, + lehre.tbl_studienplan.studienordnung_id as tbl_sp_studienordnung_id, + lehre.tbl_studienplan.orgform_kurzbz as tbl_sp_orgform_kurzbz, + lehre.tbl_studienplan.version as tbl_sp_version, + lehre.tbl_studienplan.bezeichnung as tbl_sp_bezeichnung, + lehre.tbl_studienplan.regelstudiendauer as tbl_sp_regelstudiendauer, + lehre.tbl_studienplan.sprache as tbl_sp_sprache, + lehre.tbl_studienplan.aktiv as tbl_sp_aktiv, + lehre.tbl_studienplan.semesterwochen as tbl_sp_semesterwochen, + lehre.tbl_studienplan.testtool_sprachwahl as tbl_sp_testtool_sprachwahl, + lehre.tbl_studienplan.insertamum as tbl_sp_insertamum, + lehre.tbl_studienplan.insertvon as tbl_sp_insertvon, + lehre.tbl_studienplan.updateamum as tbl_sp_updateamum, + lehre.tbl_studienplan.updatevon as tbl_sp_updatevon, + lehre.tbl_studienplan.ext_id as tbl_sp_ext_id, + lehre.tbl_studienplan.ects_stpl as tbl_sp_ects_stpl, + lehre.tbl_studienplan.pflicht_sws as tbl_sp_pflicht_sws, + lehre.tbl_studienplan.pflicht_lvs as tbl_sp_pflicht_lvs" ); // Ordering by studiengang_kz and studienplan_id @@ -133,7 +150,7 @@ class Studiengang2 extends APIv1_Controller } else // After the separator: studienplan { - $objStudienplan->{$key} = $value; + $objStudienplan->{str_replace("tbl_sp_", "", $key)} = $value; } } else