From e34bda96496f587ee84d70eba4a22ca9a59ad36e Mon Sep 17 00:00:00 2001 From: nscbrandb Date: Tue, 17 May 2016 15:47:33 +0200 Subject: [PATCH 1/4] =?UTF-8?q?Composer=20Merge-Plugin=20f=C3=BCr=20AddOn-?= =?UTF-8?q?spezifische=20composer.json's?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index b0dad7641..0e36d6f6f 100755 --- a/composer.json +++ b/composer.json @@ -54,7 +54,8 @@ "zetacomponents/workflow": "1.*", "zetacomponents/document": "1.*", "zetacomponents/workflow-database-tiein": "1.*", - "zetacomponents/workflow-event-log-tiein": "1.*" + "zetacomponents/workflow-event-log-tiein": "1.*", + "wikimedia/composer-merge-plugin": "^1.3" }, "require-dev": { @@ -63,5 +64,19 @@ "config": { "bin-dir": "bin" - } + }, + + "extra": { + "merge-plugin": { + "include": [ + "composer.json", + "addons/*/composer.json" + ], + "recurse": true, + "replace": false, + "merge-dev": false, + "merge-extra": false + } + } + } From 3bf093fd2c8c8c08e64aad503148b627bc5b45b2 Mon Sep 17 00:00:00 2001 From: nscbrandb Date: Mon, 23 May 2016 09:44:01 +0200 Subject: [PATCH 2/4] Fix --- ci_hack.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci_hack.php b/ci_hack.php index 8bafa5f7b..7de79d3cb 100755 --- a/ci_hack.php +++ b/ci_hack.php @@ -369,5 +369,5 @@ require_once(dirname(__FILE__).'/application/core/FHC_Model.php'); $model=new CI_Model(); // Traits -require_once(dirname(__FILE__).'db_extra.php'); +require_once(dirname(__FILE__).'/ci_db_extra.php'); From 42d0ef79fd75d395830fd1d63109b7d2a2ea4280 Mon Sep 17 00:00:00 2001 From: nscbrandb Date: Mon, 23 May 2016 11:44:03 +0200 Subject: [PATCH 3/4] undoing ci_hack.php --- ci_hack.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci_hack.php b/ci_hack.php index 962c22d6a..a7cfe5d02 100755 --- a/ci_hack.php +++ b/ci_hack.php @@ -369,4 +369,4 @@ require_once(dirname(__FILE__).'/application/core/FHC_Model.php'); $model=new CI_Model(); // Traits -require_once(dirname(__FILE__).'/ci_db_extra.php'); +require_once(dirname(__FILE__).'/ci_db_extra.php'); \ No newline at end of file From bb3f8ef61776830885c22237458e2006b93775ea Mon Sep 17 00:00:00 2001 From: paolo Date: Tue, 24 May 2016 12:28:49 +0200 Subject: [PATCH 4/4] - Added method getStudienplan to the controller Studienplan - Introduced parameter new in method postPrestudentstatus of the controller Prestudentstatus --- .../api/v1/crm/Prestudentstatus.php | 21 ++++++++----------- .../api/v1/organisation/Studienplan.php | 16 ++++++++++++++ 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/application/controllers/api/v1/crm/Prestudentstatus.php b/application/controllers/api/v1/crm/Prestudentstatus.php index f1bfda16a..a73e03bc6 100644 --- a/application/controllers/api/v1/crm/Prestudentstatus.php +++ b/application/controllers/api/v1/crm/Prestudentstatus.php @@ -55,27 +55,24 @@ class Prestudentstatus extends APIv1_Controller */ public function postPrestudentstatus() { - $prestudentstatus = $this->_parseData($this->post()); - - $this->response($prestudentstatus); - + $prestudentstatus = $this->_parseData($this->post()); + if ($this->_validate($prestudentstatus)) { - if (isset($prestudentstatus['ausbildungssemester']) && isset($prestudentstatus['studiensemester_kurzbz']) && - isset($prestudentstatus['status_kurzbz']) && isset($prestudentstatus['prestudent_id'])) + if(isset($prestudentstatus['new']) && $prestudentstatus['new'] == true) + { + $result = $this->PrestudentstatusModel->insert($prestudentstatus); + } + else { $pksArray = array($prestudentstatus['ausbildungssemester'], $prestudentstatus['studiensemester_kurzbz'], $prestudentstatus['status_kurzbz'], $prestudentstatus['prestudent_id'] ); - + $result = $this->PrestudentstatusModel->update($pksArray, $prestudentstatus); } - else - { - $result = $this->PrestudentstatusModel->insert($prestudentstatus); - } $this->response($result, REST_Controller::HTTP_OK); } @@ -85,7 +82,7 @@ class Prestudentstatus extends APIv1_Controller } } - private function _validate($prestudentstatus = NULL) + private function _validate($prestudentstatus = null) { return true; } diff --git a/application/controllers/api/v1/organisation/Studienplan.php b/application/controllers/api/v1/organisation/Studienplan.php index 4b1f2e5da..f27043d82 100644 --- a/application/controllers/api/v1/organisation/Studienplan.php +++ b/application/controllers/api/v1/organisation/Studienplan.php @@ -28,6 +28,22 @@ class Studienplan extends APIv1_Controller $this->StudienplanModel->setUID($this->_getUID()); } + public function getStudienplan() + { + $studienplan_id = $this->get('studienplan_id'); + + if (isset($studienplan_id)) + { + $result = $this->StudienplanModel->load($studienplan_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + public function getStudienplaene() { $studiengang_kz = $this->get('studiengang_kz');