diff --git a/application/controllers/system/messages/Messages.php b/application/controllers/system/messages/Messages.php
index 513eee634..0124e704c 100644
--- a/application/controllers/system/messages/Messages.php
+++ b/application/controllers/system/messages/Messages.php
@@ -57,9 +57,10 @@ class Messages extends Auth_Controller
$subject = $this->input->post('subject');
$body = $this->input->post('body');
$persons = $this->input->post('persons');
+ $prestudenten = $this->input->post('prestudenten');
$relationmessage_id = $this->input->post('relationmessage_id');
- $sendImplicitTemplate = $this->CLMessagesModel->sendImplicitTemplate($persons, $subject, $body, $relationmessage_id);
+ $sendImplicitTemplate = $this->CLMessagesModel->sendImplicitTemplate($prestudenten, $subject, $body, $relationmessage_id);
if (isSuccess($sendImplicitTemplate))
{
$this->load->view('system/messages/htmlSuccess');
diff --git a/application/models/CL/Messages_model.php b/application/models/CL/Messages_model.php
index 3c8217e73..399a16144 100644
--- a/application/models/CL/Messages_model.php
+++ b/application/models/CL/Messages_model.php
@@ -337,7 +337,7 @@ class Messages_model extends CI_Model
if (!is_numeric($sender_id)) show_error('The current logged user person_id is not defined');
// Retrieves message vars data for the given user/s
- $msgVarsData = $this->MessageModel->getMsgVarsDataByPersonId($persons);
+ $msgVarsData = $this->MessageModel->getMsgVarsDataByPrestudentId($persons);
if (isError($msgVarsData)) show_error(getError($msgVarsData));
if (!hasData($msgVarsData)) show_error('No recipients were given');
@@ -684,6 +684,7 @@ class Messages_model extends CI_Model
$recipientsArray = array();
$recipientsList = '';
$persons = '';
+ $prestudenten = '';
foreach (getData($info) as $receiver)
{
$recipient = new stdClass();
@@ -702,6 +703,7 @@ class Messages_model extends CI_Model
$recipientsArray[] = $recipient;
$recipientsList .= $receiver->Vorname.' '.$receiver->Nachname.'; ';
$persons .= ''."\n";
+ $prestudenten .= ''."\n";
}
// ---------------------------------------------------------------------------------------
@@ -779,6 +781,7 @@ class Messages_model extends CI_Model
'senderIsAdmin' => getData($senderIsAdmin),
'recipientsArray' => $recipientsArray,
'persons' => $persons,
+ 'prestudenten' => $prestudenten,
'relationmessage_id' => $relationmessage,
'type' => $type
);
diff --git a/application/views/system/messages/htmlWriteTemplate.php b/application/views/system/messages/htmlWriteTemplate.php
index d26ec534c..b4a6af283 100644
--- a/application/views/system/messages/htmlWriteTemplate.php
+++ b/application/views/system/messages/htmlWriteTemplate.php
@@ -163,6 +163,7 @@
+