[svn r20244] Logic change - Fixed survey invitation email : HTML not accepted - see FS#4106 (by rvelasquez)

skala
Cristian Fasanando 16 years ago
parent a434538227
commit f5a484ef60
  1. 4
      main/announcements/announcements.php
  2. 9
      main/survey/survey.lib.php

@ -1,4 +1,4 @@
<?php //$Id: announcements.php 20162 2009-04-28 20:41:46Z cfasanando $
<?php //$Id: announcements.php 20244 2009-04-30 23:38:03Z cfasanando $
/*
==============================================================================
Dokeos - elearning and course management software
@ -733,6 +733,8 @@ if(eregi('^[0-9a-z_\.-]+@(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z][0-9a-z-]*[0-9a-z
} else {
// intro of the email: receiver name and subject
$mail_body = $myrow["lastname"]." ".$myrow["firstname"]."<br />\n".stripslashes($emailTitle)."<br />";
// make a change for absolute url
$newContent = str_replace('src=\"../../','src=\"'.api_get_path(WEB_PATH).'', $newContent);
// main part of the email
$mail_body .= trim(stripslashes($newContent));
// signature of email: sender name and course URL after -- line

@ -24,7 +24,7 @@
* @package dokeos.survey
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts (if not all) of the code
@author Julio Montoya Armas <gugli100@gmail.com>, Dokeos: Personality Test modification and rewriting large parts of the code
* @version $Id: survey.lib.php 20132 2009-04-27 19:51:24Z juliomontoya $
* @version $Id: survey.lib.php 20244 2009-04-30 23:38:03Z cfasanando $
*
* @todo move this file to inc/lib
* @todo use consistent naming for the functions (save vs store for instance)
@ -4125,7 +4125,12 @@ class SurveyUtil {
}
}
// send the email if checkboxed
if (($newUser==true || $reminder==1) && $sendmail<>0) {
if (($newUser == true || $reminder == 1) && $sendmail <> 0) {
// make a change for absolute url
if (isset($invitation_text)) {
$invitation_text = str_replace('src="../../','src="'.api_get_path(WEB_PATH).'', $invitation_text);
$invitation_text = trim(stripslashes($invitation_text));
}
SurveyUtil::send_invitation_mail($value, $invitation_code, $invitation_title, $invitation_text);
$counter++;
}

Loading…
Cancel
Save