Skip to content

Commit

Permalink
Emails can take on course language as well
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Feb 9, 2004
1 parent b3153e4 commit 0cc6fa6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/moodlelib.php
Expand Up @@ -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) {
Expand Down

0 comments on commit 0cc6fa6

Please sign in to comment.