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:
367 sites
31 downloads
57 fans
Current versions available: 1

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2

Contributors

Goran Josic (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Goran Josic
    Thu, 24 Oct 2019, 11:29 PM
    Hi Borja, I will look into this as soon as I can. We are not using moodle 3.7 branch so I didn't notice this bug.
  • Borja Soler
    Thu, 24 Oct 2019, 11:31 PM
    Hi, I have the latest version of moodle 3.7.2+, the plugin seems work fine, but have a big issue with the latest version of moodle, it seems that when the plugin try to find the enroled users in wich course, cannot find any user (maybe becouse the moodle database have some changes in the latest upgrades) and finally the plugin use the second option to send notifications, second option is send notifications to all the moodle's user that have the user preference "notify by mail" activated, then the plugin send mails wich time that one course is updates to all the users of the moodle.

    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 ??
  • Goran Josic
    Fri, 25 Oct 2019, 10:16 PM
    @Borjya Soler, I have tested the last version of the notifications plugin in moodle 3.7 and it works properly. The email channel sends notifications only to the users who are enrolled in the course. Any other hint on how to create the conditions to recreate this bug?
  • Goran Josic
    Tue, 29 Oct 2019, 12:05 AM
    @Borja Soler

    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.
  • Borja Soler
    Tue, 29 Oct 2019, 12:23 AM
    Hi Gorar, many thanks for your quckly response.
    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...
  • Goran Josic
    Tue, 29 Oct 2019, 12:29 AM
    @Borja I have no idea why this happens. But if you check the function I have posted earlier you will find that it uses standard moodle functions.

    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
  • Borja Soler
    Wed, 13 Nov 2019, 8:10 PM
    Hi again Goran,

    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
  • Goran Josic
    Wed, 13 Nov 2019, 8:36 PM
    Thank you for the log. Here is what I can tell you from that log:

    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.
  • pariyanto H
    Fri, 14 Feb 2020, 5:01 PM
    @goran josic , if i want to assign course to multiple user / student in moodle, how they can have email notification from assignment that i create.
    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?
  • Henrik sune Pedersen
    Wed, 19 Feb 2020, 5:12 PM
    Hi - Is it on purpose that the github repository is deletet.
    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.
  • Goran Josic
    Thu, 20 Feb 2020, 6:45 PM
    Sorry, I didn't have time to dedicate to this plugin lately. I also don't work for the lab where the plug-in development was started. The good news is that they are developing a new plug-in which is probably better than this one. The repository was removed for this reason, but the last version is the last commit so it can be used to create a new repository. If anybody wants to continue the development of this plug-in let me know and I will add them as a developer.
  • Goran Josic
    Thu, 20 Feb 2020, 7:02 PM
    I have updated the readme file with the new repository location.

    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.
  • Kushan Rathnasekara
    Sat, 20 Feb 2021, 7:47 PM
    Dear All,

    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
  • Nadav Kavalerchik
    Sat, 20 Nov 2021, 4:35 PM
  • Pequenos Sorrisos
    Fri, 3 Nov 2023, 8:15 AM
    Hello everyone!
    This plugin is no longer supported or updated right?
    Does anyone know an alternative please?

    Thank you!
1 2 3 4 5 6 7 8
Please login to post comments