Moodle Plugins directory: Notifications | Moodle.org
Notifications
Blocks ::: block_notifications
Maintained by
Goran Josic
Not always logged in, you want to be up to date about new content, discussions or events in your Moodle courses? This moodle block implements a solution that periodically notifies learners about new content or activities included into a Moodle course. This solution will act as a sentinel that detects whether new contents or new activities have been included into the Moodle course, and notify the learners and/or the instructors about that. Notifications methods are:
e-mail message
RSS aggregator
SMS message
There is also a version of this plugin for Moodle 1.9 that can be downloaded from the Website.
Latest release:
294 sites
26 downloads
57 fans
Current versions available: 1
Useful links
Contributors
Goran Josic (Lead maintainer)
Please login to view contributors details and/or to contact them
I have a big moodle with more than 2k users and this is a bis problem that prevents that I could use the plugin..
Somebody have hade the same issue ??
This is the function extracting the Users from the course: https://github.com/arael/moodle_notifications_20/blob/master/classes/User.php#L16
Patches are welcome. If you find a way to patch this without breaking the defaults just send it to me and I will merge.
I have been checking too and you are right, the plugin works fine with a new installations of moodle 3.7.2.
Recently I hade to migrate my moodle form one server to another one, for do it i had to change properties of my database from antelope to barracuda (utf8 to utf8mb4). becouse I had tables more big than 767 bytes that is the max size that can be imported in a antelope database.
Then, you think that this change could be affect the plugin and if for this reason the plugin cannot select the enrol users in every course ?
There some way to check where is the issue ? I can send logs if is necessary. I have been checking the cron exit, but only shows the total account of users that will be notificated...
If there is a bug and it is one of those functions you should report it upstream.
The moodle function used by the block for extracting users are here: https://github.com/arael/moodle_notifications_20/blob/master/classes/User.php#L16
I have been cheecking the issue during some days and i cannot find a solution,
I think that if you see the resuts of the cron job, maybe you could see the problem easily,
Only 1 course have activated the notifications block: This is ok.
Course is "Test 23102019": Ok too
Enrol users: 3 ( send notifications to all the moodle's users): Issue
Cron Job: result
****** notifications :: begin ******
Number of courses using the block: 1
--> Processing course: Test 2310209
--> Found 38 users
--> User 59 has preferences; notify_by_email={1}
--> User 75 has preferences; notify_by_email={1}
--> User 9 has preferences; notify_by_email={1}
--> User 697 has preferences; notify_by_email={1}
--> User 617 has preferences; notify_by_email={1}
--> User 21 has preferences; notify_by_email={1}
--> User 616 has preferences; notify_by_email={1}
--> User 442 has preferences; notify_by_email={1}
--> User 458 has preferences; notify_by_email={1}
--> User 721 has preferences; notify_by_email={1}
--> User 722 has preferences; notify_by_email={1}
--> User 701 has preferences; notify_by_email={1}
--> User 702 has preferences; notify_by_email={1}
--> User 703 has preferences; notify_by_email={1}
--> User 704 has preferences; notify_by_email={1}
--> User 705 has preferences; notify_by_email={1}
--> User 706 has preferences; notify_by_email={1}
--> User 707 has preferences; notify_by_email={1}
--> User 708 has preferences; notify_by_email={1}
--> User 699 has preferences; notify_by_email={1}
--> User 709 has preferences; notify_by_email={1}
--> User 710 has preferences; notify_by_email={1}
--> User 712 has preferences; notify_by_email={1}
--> User 713 has preferences; notify_by_email={1}
--> User 714 has preferences; notify_by_email={1}
--> User 715 has preferences; notify_by_email={1}
--> User 700 has preferences; notify_by_email={1}
--> User 711 has preferences; notify_by_email={1}
--> User 716 has preferences; notify_by_email={1}
--> User 717 has preferences; notify_by_email={1}
--> User 718 has preferences; notify_by_email={1}
--> User 719 has preferences; notify_by_email={1}
--> User 720 has preferences; notify_by_email={1}
--> User 8 has preferences; notify_by_email={1}
--> User 695 has preferences; notify_by_email={1}
--> User 696 has preferences; notify_by_email={1}
--> User 698 has preferences; notify_by_email={1}
--> The course log does not exist, so initialize it
--> Done course->update_log()
--> Done course->get_recent_activities()
--> Here is the course changelist=Array
(
)
****** notifications :: end ******
What do you think ?
Any idea?
Best regards and many thakns for your time.
Borja
This log is generated by the classes/task/notify.php script of the notifications block.
This is the row: https://github.com/arael/moodle_notifications_20/blob/master/classes/task/notify.php#L59
As you can see the function for extracting the users is: $enrolled_users = $User->get_all_users_enrolled_in_the_course($course->id);
That function is found here: https://github.com/arael/moodle_notifications_20/blob/master/classes/User.php#L16
To extract the users these two lines are relevant:
This extracts the course context.
$context = context_course::instance( $course_id );
Once the context is extracted the users are extracted with the capability:
$all_users = get_users_by_capability( $context, 'mod/assignment:view', 'u.id, u.username, u.firstname, u.lastname, u.email, u.suspended, u.mailformat, u.phone2, u.firstnamephonetic, u.lastnamephonetic, u.middlename, u.alternatename', 'lastname ASC, firstname DESC' );
I don't understand why but the point of failure is there. That context doesn't seem to be set properly or your course is odd and offers access to all the users by default.
If there is a better way to extract those users which does not undermine the functioning of the block and solves your issue I am willing to apply a patch. Let me know if you find one.
if just one person it's no issue, the student can have the email notification , but for multiple user for example 5 student only just one student that can receive the notification, is this plugin can solved my problem?
We use it to confirm the versions of the plugin. If its renamed can you please send me the new name/link and update it on this plugin page.
For the record, here it is: https://bitbucket.org/elearninglab/moodle_notifications
I have no control over this repository but it can still be cloned. I don't know for how long it is going to stay there so if it is not available, and somebody wants to keep developing it, just create a repository starting from the last version of the plugin.
I want to send auto-generated email to the enrolled students on new activity uploaded to the particular course. My moodle version is 3.10. Any possibility to accommodate that ? Pls Guide. Txs
This plugin is no longer supported or updated right?
Does anyone know an alternative please?
Thank you!