MDL-35966 Assignment - Localisation issue - use userdate not strftime

This is causing a database error (reported on MySQL) when strftime returns
non-utf8 characters.  This occurs when sending assignment notifications.

This was reported and a solution provided by Chien Wen-Chang(簡文章).
This commit is contained in:
Damyon Wiese
2012-11-27 16:18:15 +08:00
parent f441ec2564
commit 2dd7131e1e
+1 -1
View File
@@ -2483,7 +2483,7 @@ class assign {
$info->username = fullname($userfrom, true);
$info->assignment = format_string($assignmentname,true, array('context'=>$context));
$info->url = $CFG->wwwroot.'/mod/assign/view.php?id='.$coursemodule->id;
$info->timeupdated = strftime('%c',$updatetime);
$info->timeupdated = userdate($updatetime, get_string('strftimerecentfull'));
$postsubject = get_string($messagetype . 'small', 'assign', $info);
$posttext = self::format_notification_message_text($messagetype, $info, $course, $context, $modulename, $assignmentname);