mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Confirm Status Message
This commit is contained in:
@@ -1844,6 +1844,48 @@ class Status extends FHCAPI_Controller
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
|
||||
//Send Message
|
||||
$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);
|
||||
|
||||
$this->load->library('MessageLib');
|
||||
$result = $this->messagelib->sendMessageUserTemplate(
|
||||
$studentdata->person_id, // receiversPersonId
|
||||
'MailStatConfirm' . $status_kurzbz, // vorlage
|
||||
[
|
||||
'anrede' => $studentdata->anrede,
|
||||
'vorname' => $studentdata->vorname,
|
||||
'nachname' => $studentdata->nachname,
|
||||
'typ' => $studentdata->typ_bezeichnung,
|
||||
'studiengang' => $studentdata->stg_bezeichnung,
|
||||
'orgform' => $studentdata->orgform_kurzbz ?: $oldstatus->orgform_kurzbz,
|
||||
'stgMail' => $studentdata->stg_email
|
||||
], // parseData
|
||||
null, // orgform
|
||||
1, // TODO
|
||||
$studentdata->oe_kurzbz, // senderOU
|
||||
null, // relationmessage_id
|
||||
MSG_PRIORITY_NORMAL, // priority
|
||||
true // multiPartMime
|
||||
);
|
||||
|
||||
|
||||
$this->terminateWithSuccess(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user