Skip to content

Commit

Permalink
MDL-61255 core_message: add notification when data not migrated
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjnelson committed Apr 10, 2018
1 parent 5cc6b3e commit 7022b8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions lang/en/message.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
$string['message'] = 'Message';
$string['messagepreferences'] = 'Message preferences';
$string['messages'] = 'Messages';
$string['messagingdatahasnotbeenmigrated'] = 'Your messages are temporarily unavailable due to upgrades in the messaging infrastructure. Please wait for them to be migrated.';
$string['messagingdisabled'] = 'Messaging is disabled on this site, emails will be sent instead';
$string['newonlymsg'] = 'Show only new';
$string['newmessage'] = 'New message';
Expand Down
8 changes: 8 additions & 0 deletions message/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@
// Now the page contents.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('messages', 'message'));

// Display a message if the messages have not been migrated yet.
if (!get_user_preferences('core_message_migrate_data', false, $user1id)) {
$notify = new \core\output\notification(get_string('messagingdatahasnotbeenmigrated', 'message'),
\core\output\notification::NOTIFY_WARNING);
echo $OUTPUT->render($notify);
}

// Display a message that the user is viewing someone else's messages.
if (!$currentuser) {
$notify = new \core\output\notification(get_string('viewinganotherusersmessagearea', 'message'),
Expand Down

0 comments on commit 7022b8d

Please sign in to comment.