Moodle putting up notification

PHP Code to provide notification on redirection

$message = 'Message on redirect';
 redirect('/index.php', $message, null, \core\output\notification::NOTIFY_SUCCESS);

   // Or use the following helper functions:

JS Code for notification

require(['core/notification'], function(notification) {
    notification.alert('Hello', 'Welcome to my site!', 'Continue');


E-learning Solution Architect | Technical Enthusiastic | LAMP Stack Developer | AWS Cloud Solution Architect (2x) | OCI (5X)

Leave a Reply

Your email address will not be published. Required fields are marked *