Moodle plugins directory: Resource notification | Moodle.org
Resource notification
Purpose
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.
Requirements
Moodle 3.0 is required.
Installation
- 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).
- If you want additional translations (for example french), you may want to upgrade your language pack (doc).
Credits
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.0 were sponsored by Xi’an Jiaotong-Liverpool University (XJTLU), China in 2016, then in 2018 by IFMS Valenciennes (France) for the Boost upgrade.
Portuguese translations are contributed by Dinis Medeiros.
Please use Github Issues to report bugs. See Bug tracker URL below.
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: https://github.com/silecs/moodle-local-resourcenotif/issues
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
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 ?
It is what I'm talking about, is html supported ?
Regards,
Thanks
html is NOT supported on purpose: we wanted to have this functionality compatible with all notification systems, including Mobile alerts (https://docs.moodle.org/32/en/Mobile_app_notifications).
This was not possible for HTML messages, so we had to choose.
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 :
https://docs.moodle.org/dev/index.php?title=AMOS_manual&redirect=no
http://imgur.com/a/TfeZm
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.
Regards,
Here, my patch lib.php to be see element in edit menu on theme Boots
Copy, paste to file lib.php
<?php
/**
* @package local_resourcenotif
* @copyright 2012-2016 Silecs {@link http://www.silecs.info/societe}
* @license http://www.gnu.org/copyleft/gpl.html 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));
}
}
}
EOJS
, true);
}