diff --git a/mod/chat/lang/en/chat.php b/mod/chat/lang/en/chat.php index 75deced78ca..a85e04b96d9 100644 --- a/mod/chat/lang/en/chat.php +++ b/mod/chat/lang/en/chat.php @@ -131,7 +131,7 @@ $string['serverip'] = 'Server ip'; $string['servermax'] = 'Max users'; $string['serverport'] = 'Server port'; $string['sessions'] = 'Chat sessions'; -$string['sessionstart'] = 'The next chat session will start in {$a}'; +$string['sessionstart'] = 'The next chat session will start on {$a->date}, ({$a->fromnow} from now)'; $string['strftimemessage'] = '%H:%M'; $string['studentseereports'] = 'Everyone can view past sessions'; $string['studentseereports_help'] = 'If set to No, only users have mod/chat:readlog capability are able to see the chat logs'; diff --git a/mod/chat/view.php b/mod/chat/view.php index 55478d7505f..076577d7e36 100644 --- a/mod/chat/view.php +++ b/mod/chat/view.php @@ -119,7 +119,10 @@ if (has_capability('mod/chat:chat', $context)) { $span = $chat->chattime - $now; if ($chat->chattime and $chat->schedule and ($span > 0)) { // A chat is scheduled. echo '

'; - echo get_string('sessionstart', 'chat', format_time($span)); + $chatinfo = new stdClass(); + $chatinfo->date = userdate($chat->chattime); + $chatinfo->fromnow = format_time($span); + echo get_string('sessionstart', 'chat', $chatinfo); echo '

'; }