Skip to content
Browse files

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(簡文章).
  • Loading branch information...
1 parent a58be8a commit a732e1f714d584c8280e0c6406efce31c5303764 @damyon damyon committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/assign/locallib.php
View
2 mod/assign/locallib.php
@@ -3182,7 +3182,7 @@ public static function send_assignment_notification($userfrom, $userto, $message
}
$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);

0 comments on commit a732e1f

Please sign in to comment.
Something went wrong with that request. Please try again.