diff --git a/lang/en/message.php b/lang/en/message.php index 220477b479a..a33f24dfe8f 100644 --- a/lang/en/message.php +++ b/lang/en/message.php @@ -84,6 +84,7 @@ $string['nomessagesfound'] = 'No messages were found'; $string['noreply'] = 'Do not reply to this message'; $string['noncontacts'] = 'Non-contacts'; $string['nonotifications'] = 'You have no notifications'; +$string['notificationdatahasnotbeenmigrated'] = 'Your notifications are temporarily unavailable due to upgrades in the notification infrastructure. Please wait for them to be migrated.'; $string['notificationwindow'] = 'Notification window'; $string['notificationpreferences'] = 'Notification preferences'; $string['notificationimage'] = 'Notification image'; diff --git a/message/output/popup/notifications.php b/message/output/popup/notifications.php index 2f0bc2581fd..a33ffe62937 100644 --- a/message/output/popup/notifications.php +++ b/message/output/popup/notifications.php @@ -65,6 +65,14 @@ $context = [ echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('notifications', 'message')); + +// Display a message if the notifications have not been migrated yet. +if (!get_user_preferences('core_message_migrate_data', false, $userid)) { + $notify = new \core\output\notification(get_string('notificationdatahasnotbeenmigrated', 'message'), + \core\output\notification::NOTIFY_WARNING); + echo $OUTPUT->render($notify); +} + echo $renderer->render_from_template('message_popup/notification_area', $context); echo $OUTPUT->footer();