General plugins (Local): Upload notification

Maintained by Picture of Hendrik Würz Hendrik Würz, Picture of Guido Roessling Guido Roessling
Students can receive mails for new material and a changelog will be generated for updated documents provided in the course.
17 sites
8 fans

Upload notification

This plugins allows students to receive a notification as soon as new material becomes uploaded. Optionally the new file can be included in the mail directly. For updated material a changelog will be displayed which includes the changed page for PDF documents.


Copyright (c) The Development Manager Ltd, Hendrik Wuerz

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <>;.



  1. Install the dependency local_changeloglib with the required command line tools (See in the changeloglib repository.)
  2. Clone the repo inside MOODLE_HOME/local/uploadnotification
    cd path/to/moodle/home
    git clone local/uploadnotification
  3. Browse to Site Administration -> Notifications and allow the database upgrades to execute
  4. After installation define your admin settings to customize the plugin behaviour. See chapter Features of this document for more information.


This plugin provides tests for the main features. To run them please follow the next steps:

  1. Install PHPUnit on your system and configure moodle. See for more information.
  2. Install the plugin.
  3. Run the tests
    cd /path/to/moodle/home
    php admin/tool/phpunit/cli/init.php
    vendor/bin/phpunit --group local_uploadnotification


Mail delivery for new material

The plugin can inform your students as soon as new material is published in one of their courses. The delivered mail can optionally include the new file. These functions must be enabled by three parties: The moodle admin, the teacher and the student. The options for courses and for students are only visible if the admin has enabled the feature.


As a moodle admin follow these steps

  1. Go to Site administration -> Plugins -> Local plugins -> Upload notification
  2. Set Allow notification mail delivery to yes. This will enable the mail delivery for course admins and students. If you set it to no, the delivery is completely disabled: No one can see the settings and no mails will be send in any case.
  3. Set Maximum filesize of mail attachments (in KB) to 100000. This will allow attachments up to 10MB. If this value is zero, no attachments will be send.

Now the feature is visible for teachers and students. As a general rule: A mail will only be send if someone (teacher or student) has requested the delivery and no one has forbidden it.


As a teacher follow these steps

  1. Go to your course -> Open the course menu (where you can access the settings, turn editing on, ...) -> Click on the link Uploadnotification
  2. You have three options for Enable notification mail delivery for material uploads
    • No preferences The default option. No mails will be send except the user requests them.
    • Disable No mails will be send for actions in this course. The student settings are ignored.
    • Enable Mails will be send except a user has disabled the delivery for himself.
  3. Set the check mark for Allow email attachments (this is the default). This will allow students to receive mails with attachments. As a teacher you can not force this to avoid unwanted traffic.


As a student follow these steps

  1. Click on your username and select Preferences
  2. At Miscellaneous you find a link Uploadnotification
  3. All students have two settings:
    • Enable notification mail delivery for material uploads with the same options as teachers. No preference will only send mails if the course settings have enabled them. Enable sends always mails except a teacher has disabled the feature for a course. Disable will never allow the mail delivery to this student.
    • Maximum filesize of mail attachments (in KB) Insert a value greater zero to receive attachments up to this size. You can not request sizes which are greater than the limit of the moodle admin. The attachment will only be send if the teacher has not removed the check mark in his his course.


Changelog generation

The plugin can build a changelog for uploaded resources. It will include the timestamp of the update and the filename of the predecessor. At the moment only file resources are supported (no folders, pages, or others). For PDF documents, the plugin can detect the page number on which changes were performed.

Teachers can update material on two ways:

  1. Delete the old resource and upload the new document independently
  2. Edit the current resource and select a new file.

A file and its predecessor must be uploaded in the same course and section.


To enable the changelog, the moodle admin has to allow this feature. If he has deactivated it, teachers will not see the options in the course settings.

  1. Go to Site administration -> Plugins -> Local plugins -> Upload notification
  2. Set Allow automatic changelog generation in courses on true. This will activate the feature for teachers.
  3. Set Allowed size of analysed files for the diff detection (in MB) to 100. This will allow the plugin to search for differences on documents with maximum 100MB filesize. If you set this value to zero, a changelog can be generated, but the pages where changes are performed will not longer be identified.
  4. Set Enable the changelog in new courses by default and Enable the diff detection in new courses by default to true. This will activate the changelog and diff detection in all courses which have no custom settings.

As a teacher follow these steps to customize the behaviour in your course:

  1. Go to your course -> Open the course menu (where you can access the settings, turn editing on, ...) -> Click on the link Uploadnotification
  2. Set Display a changelog for updates to true. This will print an information with the filename of the predecessor and the time of the change next to the new document.
  3. Set Detect differences in updates to true. This will search for changed pages in the new document and add their numbers to the changelog. This feature only works for PDF documents which are smaller than the admin-limit.
  4. Create a new PDF document in your course.
  5. Edit the new document and upload an update with a few changes.
  6. On the course page, the changelog will be displayed.
  7. Delete the updated resource and upload a version which was changed again a little bit. This upload must be in the same section as before.
  8. After a page reload (limitation of moodle because the upload was performed via ajax) the changelog is displayed again.


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


Picture of Hendrik Würz
Hendrik Würz (Lead maintainer)
Picture of Guido Roessling
Guido Roessling: Maintainer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Plugins bot
    Sun, 3 Sep 2017, 6:10 AM
    Approval issue created: CONTRIB-7031
  • Picture of J Michael Williams
    Sun, 17 Dec 2017, 2:15 AM
    Will this be upgrade for Moodle 3.4 or has the current version been tested with it?
  • Picture of Hendrik Würz
    Sun, 17 Dec 2017, 2:25 AM
    Thanks for your comment. I'm still in the process of making some improvements while testing for Moodle 3.4. However, the current version would probably still work without problems. You can expect an update of the plugin before the end of the year.
    Thu, 4 Jan 2018, 2:35 AM
    Hello. The plugin is not installed on 3.3+ not on 3.4+
  • Picture of Shamal Sabah
    Thu, 18 Jan 2018, 2:08 PM
    Not working properly, i had to remove it from my Moodle 3.3.
  • Picture of Hendrik Würz
    Thu, 18 Jan 2018, 6:32 PM
    Hi Shamal, thanks for your feedback. Could you explain what exactly wasn't working for you? Which actions have you taken and what was the actual and expected behaviour? Maybe we can find a soulution for your problem.
  • Picture of Luis Fernando R
    Thu, 8 Feb 2018, 2:39 PM
    Hi, I have Moodle 3.4.1 and I don't know if the plugin is working correctly, as I'm usining it right now, it notifies when a studen uploads a homework/assignment to a course, however this notifies everyone in the course, all students and teacher(s), I would like it to send it only to the user it uploaded the assignment and the profesor of the course, is this posible? Thanks in advance.
  • Picture of Hendrik Würz
    Fri, 9 Feb 2018, 12:46 AM
    Hi Luis, thanks for your comment. I just answer you here and assume that this Github issue is also yours:

    The plugin only informs enrolled persons for new _file resources_. This means uploads in the course page, which are normally performed by a teacher. (Uploaded via drag-and-drop or "Add an activity or resource" -> "File" -> "Save") It should not inform anyone if students upload solutions in an assignment.

    How does a received mail look like? Is it like the example in the description of this plugin? I assume that your students upload their solution in an "Assignment" activity, right? You do not have some weird configurations where students upload directly to the course main page, have you? All in all the plugin checks whether the receiver of a mail has access to the notified material. If this is not the case, the mail will not be delivered. When student A uploads a solution, student B receives a notification in your installation, right? What happens if B clicks on the link in the mail? Can he see the solution of A?

    Independently from this plugin you might have a look on the Moodle-Core features of an assignment. In the settings there is a section called "Notifications". There you can enable "Notify graders about submissions". By this you can inform the teachers when new submissions are available.
    Students can enable a confirmation mail for their uploads at "Your name" (top right on the page) -> "Preferences" -> "Notification preferences" -> "Assignment notifications". They will receive a confirmation as soon as they submit a new solution for their homework. Maybe this is what you are looking for.

    Regards, Hendrik
  • Picture of Prerna Gautam
    Sun, 6 May 2018, 6:19 PM

    I am using Moodle 3.4.2+. I installed "Upload notification plugin. Version of Upload notification plugin is 2018010702 ans version of changelog lib is 2017123100. As an admin, I made the changes in plugin to trigger email to students. As an admin, I created courses and uploaded material in the courses. The student has also made the changes in the settings to enable email notification for new uploads in "Preferences". I have described the whole problem here . Please open this link to check snapshots of my settings. But student is not getting any mails for new uploads. Kindly look into this matter.
  • Picture of Hendrik Würz
    Sun, 6 May 2018, 8:45 PM
    Hi Prerna,

    thanks for your question and the detailed system description smile

    First: Your configuration is good and it should work. I tested it again with exactly the same system settings and had no problems. A few ideas why it still doesn't work for you:

    * You have a wrong configuration for your mail-server. The plugin uses the default mail functionality provided by moodle. You can have a look at YOUR-MOODLE-SERVER/admin/settings.php?section=outgoingmailconfig or try this useful plugin to send a test mail

    * I saw that you have enabled the digest delivery of mails for your test-student. In the admin settings a delivery time at 6 am is defined. Have you waited until this time? Has your server set the correct system time? You can try to disable "Only send digest of the day" for your test-student if you want to send the mails directly.

    * There is a delay of five minutes between the upload of material and the first possible notification time. This should ensure that teachers can edit their material before everybody gets a mail. As a result the delivery might be five minutes later than expected.

    * The plugin uses the cron job provided by moodle. As long as this task is not executed, no mails can be sent.

    If all of the above ideas do not fit for your situation, you can have a look in your database. The plugin creates a table local_uploadnotification in which all planned and not already delivered mails are stored. When you upload a file, a new record will be created. When the mail is sent, the record becomes deleted. You can check whether the records exist in your system. This might help to identify the problem.

    By the way: I found a bug in the plugin's code while searching for a solution for your problem and uploaded an update of the plugin. The digest minute field was wrong interpreted. It was used as a seconds definition and not for the minutes. However, you have already set zero minutes for the digest in your system, so it should not make any difference to you.

    Regards, Hendrik
  • Picture of Prerna Gautam
    Wed, 9 May 2018, 6:49 PM
    I highly appreciate your detailed comment. There were issues in the mail server. Thank you very much. We are getting notifications on test-id via email.

    However, I would like to know if we can get notifications on mobile application also about new material uploads? I am getting push notification on mobile app only for the Announcements made under a course but not for any new material upload. I changed settings for mobile application in the following way:

    Site Administation> Advanced Features> Default message outputs
    I have enabled all the notifications for web, mobile and email.

    Please suggest how to get push notifications on mobile for new material uploads.
  • Picture of Hendrik Würz
    Thu, 10 May 2018, 6:39 PM
    Hi Prerna,

    I'm glad to hear that it works now.

    Unfortunately, push notifications on mobile devices are currently not in the scope of this plugin and in the near future, I will not have time to implement this functionality. But if you or someone else has programming experience, I encourage any to contribute. Just create a pull request on Github and I will merge the code.

    Regards, Hendrik
  • Picture of mustiko aji
    Thu, 17 Jan 2019, 3:25 PM
    Hi Hendrik,

    I have installed this plugin. is this plugin support for moodle version 3.5.2? Thanks

Please login to post comments