Skip to content

Commit

Permalink
MDL-35966 Assignment - Localisation issue - use userdate not strftime
Browse files Browse the repository at this point in the history
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
Damyon Wiese committed Nov 27, 2012
1 parent a58be8a commit a732e1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/assign/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a732e1f

Please sign in to comment.