Skip to content

Commit

Permalink
MDL-55566 chat: Improve next scheduled chat message
Browse files Browse the repository at this point in the history
  • Loading branch information
sbourget committed Nov 8, 2016
1 parent 7eb3467 commit 3bf46ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mod/chat/lang/en/chat.php
Expand Up @@ -132,7 +132,7 @@
$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';
Expand Down
5 changes: 4 additions & 1 deletion mod/chat/view.php
Expand Up @@ -119,7 +119,10 @@
$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>';
}

Expand Down

0 comments on commit 3bf46ee

Please sign in to comment.