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.
4 sites
3 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.
Please login to post comments