mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-02 19:39:27 +00:00
Coodle: optimized informations in infomail
Automatically generated feedback mails from each participant responding contains now: . clear subject name . name of participant and name of meeting . linked URL goes to specific meeting overview plus . author doesn't get any redundant email anymore (after sending final date to all participants)
This commit is contained in:
@@ -47,7 +47,7 @@ switch($work)
|
||||
if(isset($_POST['id']))
|
||||
$id=$_POST['id'];
|
||||
else
|
||||
die('RessourceID Missing');
|
||||
die('RessourceID Missing');
|
||||
if(isset($_POST['typ']))
|
||||
$typ=$_POST['typ'];
|
||||
else
|
||||
@@ -62,7 +62,7 @@ switch($work)
|
||||
|
||||
if($coodle->ersteller_uid!=$user)
|
||||
die('Diese Aktion ist nur durch den Ersteller der Umfrage möglich');
|
||||
|
||||
|
||||
$uid='';
|
||||
$ort='';
|
||||
$email='';
|
||||
@@ -74,7 +74,7 @@ switch($work)
|
||||
case 'Person': $uid = $id; break;
|
||||
case 'Extern':
|
||||
$email = $id;
|
||||
$name=$bezeichnung;
|
||||
$name = $bezeichnung;
|
||||
break;
|
||||
case 'Gruppe': $gruppe_kurzbz = $id; break;
|
||||
default: die('Ungueltiger Typ:'.$typ); break;
|
||||
@@ -85,14 +85,14 @@ switch($work)
|
||||
$gruppe = new gruppe();
|
||||
if(!$gruppe->loadUser($gruppe_kurzbz))
|
||||
die('Fehler: '.$gruppe->errormsg);
|
||||
|
||||
|
||||
foreach($gruppe->result as $row)
|
||||
{
|
||||
$coodle->coodle_id = $coodle_id;
|
||||
$coodle->uid = $row->uid;
|
||||
$coodle->ort_kurzbz = $ort;
|
||||
$coodle->email = $email;
|
||||
$coodle->name = $name;
|
||||
$coodle->email = $row->uid .'@'.DOMAIN;
|
||||
$coodle->name = $row->vorname . ' ' . $row->nachname;
|
||||
$coodle->zugangscode = uniqid();
|
||||
$coodle->insertamum = date('Y-m-d H:i:s');
|
||||
$coodle->insertvon = $user;
|
||||
@@ -114,18 +114,26 @@ switch($work)
|
||||
{
|
||||
if($coodle->RessourceExists($coodle_id, $uid, $ort, $email))
|
||||
die('Ressource ist bereits zugeteilt');
|
||||
|
||||
|
||||
$coodle->coodle_id = $coodle_id;
|
||||
$coodle->uid = $uid;
|
||||
$coodle->ort_kurzbz = $ort;
|
||||
$coodle->email = $email;
|
||||
$coodle->name = $name;
|
||||
$coodle->ort_kurzbz = $ort;
|
||||
if ($typ == 'Person')
|
||||
{
|
||||
$coodle->email = $uid.'@'.DOMAIN;
|
||||
$coodle->name = implode(' ', array_reverse(explode(' ', $bezeichnung)));
|
||||
}
|
||||
if ($typ == 'Extern')
|
||||
{
|
||||
$coodle->email = $email;
|
||||
$coodle->name = $bezeichnung;
|
||||
}
|
||||
$coodle->zugangscode = uniqid();
|
||||
$coodle->insertamum = date('Y-m-d H:i:s');
|
||||
$coodle->insertvon = $user;
|
||||
$coodle->updateamum = date('Y-m-d H:i:s');
|
||||
$coodle->updatevon = $user;
|
||||
|
||||
|
||||
if($coodle->saveRessource(true))
|
||||
echo 'true';
|
||||
else
|
||||
|
||||
+11
-7
@@ -121,9 +121,9 @@ if(isset ($_POST['save']))
|
||||
{
|
||||
$coodle_help->load($coodle_id);
|
||||
// email an ersteller senden wenn option aktiviert
|
||||
if ($coodle_help->mailversand)
|
||||
if ($coodle_help->mailversand && (!isset($_POST['auswahl_termin'])))
|
||||
sendBenachrichtigung($coodle_id,$teilnehmer_uid);
|
||||
|
||||
|
||||
$saveOk=true;
|
||||
}
|
||||
}
|
||||
@@ -665,7 +665,10 @@ echo '<br><br>
|
||||
*/
|
||||
function sendBenachrichtigung($coodle_id,$teilnehmer_id)
|
||||
{
|
||||
global $uid;
|
||||
global $coodle;
|
||||
$coodle_send = new coodle();
|
||||
|
||||
if(!$coodle_send->load($coodle_id))
|
||||
{
|
||||
die("Fehler beim senden aufgetreten");
|
||||
@@ -686,7 +689,7 @@ function sendBenachrichtigung($coodle_id,$teilnehmer_id)
|
||||
}
|
||||
$mitarbeiter->load($coodle_send->ersteller_uid);
|
||||
$person->load($mitarbeiter->person_id);
|
||||
|
||||
|
||||
$email = '';
|
||||
|
||||
$name = '';
|
||||
@@ -699,13 +702,14 @@ function sendBenachrichtigung($coodle_id,$teilnehmer_id)
|
||||
$email.= 'Sehr geehrte Frau '.$name."!<br><br>";
|
||||
else
|
||||
$email.="Sehr geehrter Herr ".$name."!<br><br>";
|
||||
|
||||
$email.= $tn." hat einen Termin Ihrer Coodle-Umfrage ausgewählt<br><a href='".APP_ROOT."cis/private/coodle/uebersicht.php'>Link zu Ihrer Coodle Übersicht</a><br><br>Mit freundlichen Grüßen <br><br>
|
||||
|
||||
$link = APP_ROOT.'cis/public/coodle.php?coodle_id='.urlencode($coodle_id).'&uid='.urlencode($uid);
|
||||
$email.= $tn.' hat einen Termin zu Ihrer Coodle-Umfrage mit dem Thema "'.$coodle->titel.'" ausgewählt.<br><a href="'.$link.'">Link zu Ihrer Coodle Umfrage</a><br><br>Mit freundlichen Grüßen <br><br>
|
||||
Fachhochschule Technikum Wien<br>
|
||||
Höchstädtplatz 6<br>
|
||||
1200 Wien";
|
||||
1200 Wien';
|
||||
|
||||
$mail = new mail($coodle_send->ersteller_uid.'@'.DOMAIN, 'no-reply', 'Coodle Umfrage', 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.');
|
||||
$mail = new mail($coodle_send->ersteller_uid.'@'.DOMAIN, 'no-reply', 'Feedback zu Ihrer Coodle Umfrage "' . $coodle->titel . '"', 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.');
|
||||
$mail->setHTMLContent($email);
|
||||
if(!$mail->send())
|
||||
die("Fehler beim senden des Mails aufgetreten");
|
||||
|
||||
+21
-22
@@ -567,6 +567,7 @@ class coodle extends basis_db
|
||||
*/
|
||||
public function getRessourceFromUser($coodle_id, $uid='', $zugangscode='')
|
||||
{
|
||||
|
||||
$qry ="SELECT * FROM campus.tbl_coodle_ressource
|
||||
WHERE coodle_id =".$this->db_add_param($coodle_id, FHC_INTEGER, false);
|
||||
|
||||
@@ -575,36 +576,34 @@ class coodle extends basis_db
|
||||
|
||||
if ($zugangscode != '')
|
||||
$qry.= " AND zugangscode = ".$this->db_add_param($zugangscode, FHC_STRING, false);
|
||||
|
||||
$qry.= ';';
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$this->coodle_ressource_id = $row->coodle_ressource_id;
|
||||
$this->coodle_id = $row->coodle_id;
|
||||
$this->uid = $row->uid;
|
||||
$this->ort_kurzbz = $row->ort_kurzbz;
|
||||
$this->email = $row->email;
|
||||
$this->name = $row->name;
|
||||
$this->zugangscode = $row->zugangscode;
|
||||
$this->insertamum = $row->insertamum;
|
||||
$this->insertvon = $row->insertvon;
|
||||
$this->updateamum = $row->updateamum;
|
||||
$this->updatevon = $row->updatevon;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
$this->errormsg = 'Fehler bei einer Datenbankabfrage';
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->coodle_ressource_id = $row->coodle_ressource_id;
|
||||
$this->coodle_id = $row->coodle_id;
|
||||
$this->uid = $row->uid;
|
||||
$this->ort_kurzbz = $row->ort_kurzbz;
|
||||
$this->email = $row->email;
|
||||
$this->name = $row->name;
|
||||
$this->zugangscode = $row->zugangscode;
|
||||
$this->insertamum = $row->insertamum;
|
||||
$this->insertvon = $row->insertvon;
|
||||
$this->updateamum = $row->updateamum;
|
||||
$this->updatevon = $row->updatevon;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = "Fehler bei der Abfrage aufgetreten";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user