From 85a10e27cc1b84cfe9f4792988e8db61a411365a Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Mon, 2 Feb 2026 17:59:15 +0100 Subject: [PATCH] fix setFirstStudent if GENERATE_ALIAS_STUDENT is false --- application/controllers/api/frontend/v1/stv/Status.php | 7 +++---- application/libraries/PrestudentLib.php | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/application/controllers/api/frontend/v1/stv/Status.php b/application/controllers/api/frontend/v1/stv/Status.php index 09a9f18b1..3c0a639cd 100644 --- a/application/controllers/api/frontend/v1/stv/Status.php +++ b/application/controllers/api/frontend/v1/stv/Status.php @@ -636,7 +636,7 @@ class Status extends FHCAPI_Controller $this->load->library('PrestudentLib'); - $this->prestudentlib->setFirstStudent( + $resFirstStudent = $this->prestudentlib->setFirstStudent( $prestudent_id, $lastAufgenommener->studiensemester_kurzbz, $lastAufgenommener->ausbildungssemester, @@ -645,9 +645,8 @@ class Status extends FHCAPI_Controller $this->input->post('statusgrund_id') ); - $this->getDataOrTerminateWithError($result); - - $this->db->trans_commit(); + $this->db->trans_complete(); + $this->getDataOrTerminateWithError($resFirstStudent); return $this->outputJsonSuccess(true); } diff --git a/application/libraries/PrestudentLib.php b/application/libraries/PrestudentLib.php index a57533da0..b1f2dc900 100644 --- a/application/libraries/PrestudentLib.php +++ b/application/libraries/PrestudentLib.php @@ -723,7 +723,7 @@ class PrestudentLib // Generate Alias - $alias = ''; + $alias = null; if (!defined('GENERATE_ALIAS_STUDENT') || GENERATE_ALIAS_STUDENT === true ) {