Compare commits

...
@@ -1625,7 +1625,6 @@ class Status extends FHCAPI_Controller
$oldstatus = current($oldstatus);
$authUID = getAuthUID();
$now = date('c');
@@ -1661,27 +1660,25 @@ class Status extends FHCAPI_Controller
'updatevon' => $authUID
]);
$this->getDataOrTerminateWithError($result);
$data = $this->getDataOrTerminateWithError($result);
//Send Message
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
/* $this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->PrestudentModel->addSelect('p.*');
$this->PrestudentModel->addSelect('stg.oe_kurzbz');
$this->PrestudentModel->addSelect('stg.bezeichnung AS stg_bezeichnung');
$this->PrestudentModel->addSelect('stg.email AS stg_email');
$this->PrestudentModel->addSelect('plan.orgform_kurzbz');
$this->PrestudentModel->addSelect('typ.bezeichnung AS typ_bezeichnung');
$this->PrestudentModel->addJoin('public.tbl_person p', 'person_id');
$this->PrestudentModel->addJoin('public.tbl_studiengang stg', 'studiengang_kz');
$this->PrestudentModel->addJoin('public.tbl_studiengangstyp typ', 'typ');
$this->PrestudentModel->addJoin('public.tbl_studienplan plan', 'studienplan_id', 'LEFT');
$result = $this->PrestudentModel->load($prestudent_id);
$studentdata = $this->getDataOrTerminateWithError($result);
$studentdata = current($studentdata);
$orgform = $oldstatus->orgform_kurzbz || '';
$this->load->library('MessageLib');
$result = $this->messagelib->sendMessageUserTemplate(
@@ -1693,7 +1690,8 @@ class Status extends FHCAPI_Controller
'nachname' => $studentdata->nachname,
'typ' => $studentdata->typ_bezeichnung,
'studiengang' => $studentdata->stg_bezeichnung,
'orgform' => $studentdata->orgform_kurzbz ?: $oldstatus->orgform_kurzbz,
// 'orgform' => $studentdata->orgform_kurzbz ?: $oldstatus->orgform_kurzbz,
'orgform' => $orgform,
'stgMail' => $studentdata->stg_email
], // parseData
null, // orgform
@@ -1702,10 +1700,9 @@ class Status extends FHCAPI_Controller
null, // relationmessage_id
MSG_PRIORITY_NORMAL, // priority
true // multiPartMime
);
);*/
$this->terminateWithSuccess(true);
$this->terminateWithSuccess($data);
}
/**