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(簡文章).
1 parent f441ec2 commit 2dd7131e1ec3ab51093ec8d734a3ba9d75b4634e @damyon damyon committed Nov 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/assign/locallib.php
2 mod/assign/locallib.php
@@ -2483,7 +2483,7 @@ public static function send_assignment_notification($userfrom, $userto, $message
$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);

0 comments on commit 2dd7131

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