Merge branch 'MDL-55566_m32v1' of https://github.com/sbourget/moodle
authorDavid Monllao <davidm@moodle.com>
Fri, 18 Nov 2016 01:05:13 +0000 (09:05 +0800)
committerDavid Monllao <davidm@moodle.com>
Fri, 18 Nov 2016 01:05:13 +0000 (09:05 +0800)
mod/chat/lang/en/chat.php
mod/chat/view.php

index 91545ba..16bee92 100644 (file)
@@ -132,7 +132,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';
index ba6f2c5..8dfabf3 100644 (file)
@@ -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 '<p>';
-        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 '</p>';
     }