From: moodler Date: Mon, 9 Feb 2004 08:49:54 +0000 (+0000) Subject: Emails can take on course language as well X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0cc6fa6a1fd12ce52428c1d9165950dde0ed9a9a;p=moodle.git Emails can take on course language as well --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index bdc2024a04..7f9364b549 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -1147,6 +1147,11 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml="", $a global $CFG, $_SERVER; + global $course; // This is a bit of an ugly hack to be gotten rid of later + if (!empty($course->lang)) { // Course language is defined + $CFG->courselang = $course->lang; + } + include_once("$CFG->libdir/phpmailer/class.phpmailer.php"); if (!$user) {