Blocks: Advanced Notifications

block_advnotifications
Maintained by Picture of Zander Potgieter Zander Potgieter, Picture of Learning Works Learning Works
Allows for notifications to be easily managed and set to be displayed to users
393 sites
615 downloads
36 fans

TravisCI Pull Requests Welcome


Allows for notifications to be easily managed and set to be displayed to users

This block allows users to display DEFCON-like alerts, which are Bootstrap-based, allowing for various configurations.

This could be useful in cases such as alerting users of scheduled outages, welcoming them to your site, teachers can use it to notify users of changes/due dates, etc.


Features


Features:

  • Customisable title
  • Customisable message
  • Basic HTML allowed for advanced users
  • Multi-lingual support
  • Multiple types of notifications (Bootstrap-based)
  • Type-based icons (optional setting)
  • Dismissible/Non-Dismissible
  • Customisable date range to show notification from and to
  • Display a notification to the user a set amount of times
  • Instance-based or global/site-wide notifications
  • Enable/Disable a/all notifications (Site-wide and instance-based)
  • Edit/Delete/Restore notifications
  • Option to auto-delete notification after end date
  • Option to permanently delete notifications that have had the deleted flag for more than 30 days
  • Option to automatically remove user (dismissed/seen) records that relate to notifications that don't exist anymore
  • AJAX used to improve user-experience and simplify processes
  • Live-preview when making/editing a notification
  • Easy to use, but fully documented with all the nitty-gritty information
  • Implements Privacy API (GDPR Compliance)

For full documentation, please check here - or check the plugin's `/docs` directory.


Notification Anatomy

Alert Types

Installation Notice

All the plugin's settings are disabled by default. Enable it upon installation if you wish to start using it immediately or enable it later by navigating to Site Administration > Plugins > Blocks > Advanced Notifications. 


Backwards Compatibility/Progressive Enhancement

Although the plugin works and is usable without JavaScript, it is highly recommended to use the plugin with JavaScript enabled. Using the plugin with JavaScript disabled does not allow for some features to be used to their full potential ranging from dismissing a notification to dynamically editing existing notifications and the live-preview feature - all of which relies on JavaScript in some form to make the user's experience more enjoyable.


Pull Requests

Pull requests are welcome - submit pull requests to address issues, add features, fix typos, anything!


Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3

Contributors

Picture of Zander Potgieter
Zander Potgieter (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Zander Potgieter
    Fri, 2 Mar 2018, 5:15 AM
    Hi Benjamin,
    Thanks - glad you like it!
    While Moodle Forms allows for HTML wysiwyg fields, I opted not to use Moodle Forms as it lacked some functionality I required.
    I'm looking into improving the fields in multiple ways, though, so stay tuned! ;)
    Thanks,
    Zander
  • Picture of Nezam Ansari
    Fri, 27 Apr 2018, 9:25 PM
    Dear Zander,

    If we don't choosing the from and to date then it showing 01/01/1970. it would be better to show empty or current date.

    Thanks
  • Picture of Zander Potgieter
    Tue, 1 May 2018, 6:59 AM
    Hi Nezam,

    Good call - makes sense! I'll try to get it in the next update.

    Thanks,
    Zander
  • Picture of Dan Jeffries
    Thu, 7 Jun 2018, 11:07 PM
    Hi Zander - great plugin, congrats!

    I've gone to use it for the first time as I wanted to advise users of an important website, however there's no option for HTML! I appreciate a WYSIWYG editor may not be ideal, but including HTML would be invaluable (I have used HTML in other bootstrap elements before).

    Hopefully it's something that can be implemented smile

    Best - Dan
  • Picture of Zander Potgieter
    Mon, 11 Jun 2018, 12:27 PM
    Thanks Dan!

    And thanks for the feedback. I've added it as an issue/feature request over on GitHub (https://github.com/learningworks/moodle-block_advnotifications/issues/9) - you can follow any progress there.

    Thanks,
    Zander
  • Picture of Yannick Vrolant
    Tue, 19 Jun 2018, 12:40 AM
    Hi, thanks for this awesome plugin ! One suggestion though : would be really nice if we could use the multilang tags and filter within the title + text of the notifications... Let us know if you ever make this dream come true and congrats on a great job !
  • Picture of Zander Potgieter
    Fri, 6 Jul 2018, 1:15 PM
    Hi Dan & Benjamin,

    basic HTML is now allowed to be used in the Title & Message of the notification (from v1.2.2+) - scripts and the like are stripped. More advanced users can now customise their notifications with custom HTML. I've also made it a setting so administrators can turn this functionality on/off if they wish to do so. Hope it helps a bit! smile

    Thanks,
    Zander
  • Picture of Zander Potgieter
    Fri, 6 Jul 2018, 1:18 PM
    Hi Yannick,

    Thanks a lot, and nice suggestion! I've added it as an issue over on GitHub (https://github.com/learningworks/moodle-block_advnotifications/issues/11). I hope to implement it in an upcoming release.

    Thanks,
    Zander
  • Picture of Zander Potgieter
    Fri, 13 Jul 2018, 9:14 AM
    Hi Nezam,

    The plugin has been updated to display dates better now - no more 01/01/1970! ;)

    Thanks,
    Zander
  • Picture of Zander Potgieter
    Fri, 20 Jul 2018, 9:31 AM
    Hi Yannick,

    I've added support for filters in the latest release, so it should support multilang tags as you requested now. Enjoy!

    Thanks,
    Zander
  • Picture of bobby demers
    Thu, 24 Jan 2019, 10:59 PM
    Hi.

    I'm getting the message "Installation aborted due to validation failure" when I try to update.

    Moodle 3.5.1+ (Build: 20180713)

    Regards

    sox
  • Picture of Zander Potgieter
    Fri, 25 Jan 2019, 4:20 AM
    Hi bobby,

    Do you see any additional information above the "Installation aborted due to validation failure" message?

    Something like:
    Validating block_advnotifications ... Error
    [Error] Write access check [/moodle/blocks/advnotifications]
    Installation aborted due to validation failure

    If it looks like the message above, it may mean you don't have permission to change the plugins files/folder.

    Please see https://github.com/learningworks/moodle-block_advnotifications/issues/16 for more info...

    Let me know.

    Thanks,
    Zander
  • Picture of Zander Potgieter
    Fri, 25 Jan 2019, 6:29 AM
    Also, bobby, the plugin (as at v1.3.2) supports Moodle 3.5 - but from 3.5.3.

    So, if your error message looks something like:
    Validating block_advnotifications ... Error
    [Error] Required Moodle version [2018051703]
    Installation aborted due to validation failure

    That would be why...

    The reason is that the Privacy API (for GDPR compliance) requires two specific functions from Moodle 3.5.3 onwards and I have included these functions. To be safe, I set the required Moodle version to Moodle 3.5.3.

    PS. The required version number (2018051703) is different from the build number (20181112).

    Hope this helps,
    Zander
  • Picture of bobby demers
    Fri, 25 Jan 2019, 2:51 PM
    Hi Zander.
    It must be the Moodle version then. The full message is:

    Debugging output enabled
    Downloading block_advnotifications ...
    <- https://moodle.org/plugins/download.php/18798/block_advnotifications_moodle36_2019012311.zip
    -> /var/moodle_data/temp/core_plugin/code_manager/distfiles/4789cdcac10e2b655fe3e9de9a62bba9.zip ... OK
    Validating block_advnotifications ... Error
    [OK] Name of the plugin to be installed [advnotifications]


    [OK] Plugin version [2019012311]
    [Error] Required Moodle version [2018051703]
    Installation aborted due to validation failure

    Thanks

    bobby
  • Picture of Zander Potgieter
    Tue, 29 Jan 2019, 5:15 AM
    No worries, Bobby! ;)
1 2
Please login to post comments