mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-61255 core_message: add notification when data not migrated
This commit is contained in:
parent
5cc6b3eeb5
commit
7022b8d9e4
@ -71,6 +71,7 @@ $string['messagepreferences'] = 'Message preferences';
|
||||
$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';
|
||||
|
@ -147,6 +147,14 @@ $messagearea = new \core_message\output\messagearea\message_area($user1->id, $us
|
||||
// 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'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user