mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-61255 core_message: add warning when notifications not migrated
This commit is contained in:
parent
78348dfc4e
commit
23de6f3a2d
2 changed files with 9 additions and 0 deletions
|
@ -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';
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue