General plugins (Local): Resource notification

Maintained by Picture of Guillaume Allègre Guillaume Allègre
This Moodle plugin allows a teacher to notify course students by internal messaging when a new resource/activity is created or modified into a course.
107 sites
22 fans

This Moodle plugin allows a teacher to notify course students by messaging
when a new resource/activity is created or modified into a course.

The notification is activated by an action performed by the teacher.
This new action is shown in a new entry at the end of the Edit dropdown menu,
available for each resource or activity, on a course page.

The notification message contains two links by default, one to the resource, and the other to the course.
The Moodle admin can modify this default setting.
The teacher can change the text to send.                                                                                       

The teacher can control who the message is sent to, by default all the users enrolled
into the course and allowed to view the resource.
The notification conforms to resource access restrictions such as course groups.

Moodle 3.0 is required.
Moodle has changed the way it loads plugins with its 3.1 version. The new API was introduced in Moodle 3.0, hence the requirements.


  • Unpack or `git clone` under `local/`.
  • Install the plugin into Moodle with either by typing `php admin/cli/upgrade.php` (CLI) or by visiting '/admin/index.php' (web).

This plugin was developped by Silecs and initially sponsored by Université Paris 1 Panthéon-Sorbonne, France in 2013.
Additional enhancements and migration to Moodle 3.x were sponsored by Xi’an Jiaotong-Liverpool University (XJTLU), China in 2016.


Screenshot #0
Screenshot #1
Screenshot #2


Picture of Guillaume Allègre
Guillaume Allègre (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Gyula Papp
    Thu, 27 Oct 2016, 5:18 AM
    I trying install this plugin. Unpack code the moodle/local folder and visiting '/admin/index.php' . Nothing happens. What's the trick? The folder name or something else?
  • Picture of Guillaume Allègre
    Fri, 27 Jan 2017, 2:10 AM
    Hi Gyula, sorry for the time ; I didn't see your comment until today.
    Which version of Moodle and of the plugin do you use ?
    The folder name must be local/resourcenotif/

    If you have other problems or bug reports, it's better to use the github issues tracker:
  • Picture of Aurelien DARIE
    Sat, 4 Feb 2017, 8:10 AM
    Great plugin, very useful, most of my students are encourage in doing the activities given.
    I would like to modify the layout of the message. How can I achieve this ?
    Thank you
  • Picture of Guillaume Allègre
    Tue, 7 Feb 2017, 5:22 PM
    Hi Aurelien,
    in the menu Site administration > Plugins > Local plugins > Resource notification
    you can type another message template.
    I think it's what you call the layout, right ?

  • Picture of Aurelien DARIE
    Wed, 8 Feb 2017, 11:07 PM
    Hi Guillaume,
    It is what I'm talking about, is html supported ?
  • Picture of Dinis Medeiros
    Mon, 6 Mar 2017, 10:52 PM
    Why it don't appear to translate to PT-PT?
  • Picture of Guillaume Allègre
    Fri, 10 Mar 2017, 10:54 PM
    To Aurelien DARIE :
    html is NOT supported on purpose: we wanted to have this functionality compatible with all notification systems, including Mobile alerts (
    This was not possible for HTML messages, so we had to choose.
  • Picture of Guillaume Allègre
    Fri, 10 Mar 2017, 11:02 PM
    To Dinis Medeiros:
    Currently, there is only english and french versions.
    You can contribute to localize the english messages into pt:PT with the translation platform : see TRANSLATION tab, and AMOS documentation :
  • Picture of Dinis Medeiros
    Sun, 12 Mar 2017, 3:55 AM
    I'm a translator to PT-PT. More than 10000 strings. When i click here (Contribute translations for Português - Portugal ‎(pt)‎) i get No strings found. Where is you plugin? In others plugins when i click in similar links i go to the AMOS respective page and yours plugin don't. Thanks
  • Picture of Diego Racero
    Wed, 10 May 2017, 7:05 AM
    Hi, I jus installed de plugin but I was not able to see the icon in the Edit drop down menu. I checked the folder and the plugin is in the right folder, I was able to see the configuration in local plugin pane but nothing happened in the drop down edit menu. ¿Could you give some advice in order to solved this problem?
  • Picture of Benoît Lathière
    Thu, 25 May 2017, 1:41 AM
    I just fixed Javascript lines in the 'lib.php' to be reflecting the Moodle 3.2 html menu elements.
    Guillaume, do You want the patch to publish a 3.2 version of your module?
    Thanks for your work.
  • Picture of Pak Guru
    Mon, 17 Jul 2017, 9:41 AM
    Hi Beniot, can you show us what did you do to lib.php in order to make it compatible in Moodle 3.2? thank before.
  • Picture of Arkadiusz Malkowski
    Fri, 28 Jul 2017, 9:11 AM
    Here, my patch lib.php to be see element in edit menu on theme Boots
    Copy, paste to file lib.php
    * @package local_resourcenotif
    * @copyright 2012-2016 Silecs {@link}
    * @license GNU GPL v3 or later

    function local_resourcenotif_extend_navigation_course() {
    global $OUTPUT, $PAGE;

    $html =''
    . $OUTPUT->pix_icon('t/email', get_string("notifications"), 'moodle', array('class' => 'iconsmall', 'title' => ''))
    . '' . htmlspecialchars(get_string("notifications")) . ''
    . '
    $enc = json_encode($html);

    $PAGE->requires->js_init_code(<< var activities = document.querySelectorAll('div[role="menu"]');
    if (activities) {
    for (var i = 0; i < activities.length; i++) {
    var ul = activities[i];
    var owner = ul.parentNode.parentNode.parentNode.getAttribute('data-owner');
    if (owner) {
    var id = owner.replace(/^#module-/, '');
    ul.insertAdjacentHTML('beforeend', $enc.replace('123XYZ321', id));
    , true);
  • Picture of Yezi Yang
    Thu, 3 Aug 2017, 1:57 PM

    Our institution is using the resource notification plugin since the last academic year. It is very welcomed by teachers and students. However, I found the plugin cannot be visible under Boost theme in Moodle 3.3.1. But Boost theme is the core theme in Moodle 3.3. now. Could you fix the problem soon, please?
  • Picture of Benoît Lathière
    Wed, 4 Oct 2017, 10:50 PM
    Hi, the Arkadiusz solution is good.
    You can try another approach for Moodle 3.3, the offical method to call JS (passed in 3.2, not testes in 3.3) :

    [file lib.php] <?php
    * @package local_resourcenotif
    * @copyright 2012-2016 Silecs {@link}
    * @license GNU GPL v3 or later
    function local_resourcenotif_extend_navigation_course($settingsnav, $context) {
    global $OUTPUT, $PAGE;
    $html = " . "href='" . htmlspecialchars(new moodle_url('/local/resourcenotif/resourcenotif.php', array('id' => '123XYZ321')))."' "
    . "title='" . htmlspecialchars(get_string("notifications")) . "'>"
    . $OUTPUT->pix_icon('t/email', get_string("notifications"), 'moodle', array('class' => 'iconsmall', 'title' => ''))
    . "" . htmlspecialchars(get_string("notifications")) . ""
    . "";
    $PAGE->requires->js_call_amd('local_resourcenotif/script', 'init', array($html));

    [file amd/src/script.js]
    // Put this file in path/to/plugin/amd/src
    // You can call it anything you like
    /* eslint no-unused-vars: "off", max-len: "off", no-tabs:"off"*/
    define(['jquery', 'jqueryui'], function($) {
    return {
    init: function(html) {
    var activities = $('.section-cm-edit-actions div[role="menu"]');
    if (activities) {
    for (var i = 0; i < activities.length; i++) {
    var ul = activities[i];
    var owner = ul.parentNode.parentNode.parentNode.getAttribute('data-owner');
    if(owner) {
    var id = owner.replace(/^#module-/, '');
    ul.innerHTML += html.replace('123XYZ321', id);

    [file amd/build/script.min.js]
    define(["jquery","jqueryui"],function(a){return{init:function(b){var c=a('.section-cm-edit-actions div[role="menu"]');if(c)for(var d=0;d

    Best regards,

1 2
Please login to post comments