Upload notification

General plugins (Local) ::: local_uploadnotification
Maintained by Hendrik Würz, Guido Roessling
Students can receive mails for new material and a changelog will be generated for updated documents provided in the course.
Latest release:
25 sites
20 downloads
13 fans
Current versions available: 2

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.

License

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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
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 <http://www.gnu.org/licenses/>;.

Requirements

Installation

  1. Install the dependency local_changeloglib with the required command line tools (See readme.md in the changeloglib repository.)
  2. Clone the repo inside MOODLE_HOME/local/uploadnotification
    cd path/to/moodle/home
    git clone https://github.com/hwuerz/moodle-local_uploadnotification.git 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.

Tests

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 https://docs.moodle.org/dev/PHPUnit 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

Features

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.

30982489-d3f37404-a487-11e7-9dab-bf843fd35bd4.png

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.

34462757-116ddbaa-ee4b-11e7-8d95-e885799187ca.png

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.

30982503-e20521fa-a487-11e7-977b-1ba39c92d37f.png

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.

34462774-5caf4fcc-ee4b-11e7-9003-8e03d02e36a6.png

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.

30982463-c4d12a20-a487-11e7-93b8-3140a8aa2c59.png

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.

Screenshots

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

Contributors

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

Comments RSS

Show comments
  • Anja Wehking
    Wed, 4 Mar 2020, 7:47 PM
    Hi,
    since we've updated to moodle 3.8 the plugin doesn't work properly. There's a course where messages are sent and another where no messages are sent, but both courses have the same settings. Is this due to the incompatibility or might there be another reason? Thanks for suggestions.

    Regards, Anja
  • Kilah Honoe
    Fri, 24 Apr 2020, 8:37 PM
    Hi, my moodle site got totally "white paged" after trying to install the plugin, using moodle 3.8. What do I have to do to undo this?
  • Guido Roessling
    Fri, 24 Apr 2020, 10:08 PM
    I would be surprised if this plugin is indeed to blame for that, as we have it running, as well. If simply uninstall the plugin, your site should be back in working order.
  • Felix G.
    Wed, 6 May 2020, 2:37 AM
    Hey Guido,
    I have the same problem. "White Page" after installing your plugin.
  • Guido Roessling
    Wed, 6 May 2020, 1:24 PM
    Hi Felix,
    I am sorry to hear that, but cannot confirm these issues here. Can you please do the following steps and let me know what comes out of it?
    1. Uninstall the plugin (e.g., manually delete ......./local/uploadnotification and ....../local/changeloglib)
    2. Check that Moodle now works flawlessly (no "white page")
    3. Turn on debugging
    4. Reinstall the plugin
    5. Check if the "white page" has reappeared
    6. Look at the server logs (near the end) of your web server and copy the error message. That should give a clue to what is wrong.
    (then de-install the plugin and reset debugging to the previous level).
    Thank you!
  • Henrik sune Pedersen
    Fri, 4 Dec 2020, 6:20 PM
    Hi,

    Is these plugins going to be updated to Moodle 3.9?
  • Guido Roessling
    Fri, 4 Dec 2020, 6:53 PM
    Hi Henrik,
    although the lead developer is no longer working with us, the plugin works without problems in our 3.9 (now 3.10) installation smile.
  • Kushan Rathnasekara
    Sat, 20 Feb 2021, 7:54 PM
    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. (This plugin is not compatible with 3.9 or 3.10. My system crashed by installing this.) Pls let me have an update one or any alternative solution to achieve the above task. Thank you so much !!!
  • Guido Roessling
    Sat, 20 Feb 2021, 10:22 PM
    What do you mean by "your system crashed by installing this"? What exactly happened (if you re-install it after turning on debugging, what does the message show)?
    See the description a few posts further up for debugging. As the lead developer has left the team, I need more information to check what might have gone wrong...
  • Simone Berger
    Mon, 1 Nov 2021, 5:43 PM
    Same here. After copying "uploadnotification" into "moodle/local/" folder, my site went blank page with error 500. Server logs (/var/log/apache2/error.log) do not show anything though. Running Moodle 3.11 latest stable on Debian GNU/Linux.
  • Guido Roessling
    Tue, 2 Nov 2021, 12:35 AM
    Sorry for any problems this module seems to cause. Please follow the steps outline a bit above (from May 6, 2020) to figure out what the exact error message(s) are, and send them to me (roessling@acm.org, or here in the comments), so we can figure out what the problem is. It works without a problem in my installation, so it is hard to reproduce without further information...
  • Simone Berger
    Tue, 2 Nov 2021, 8:19 AM
    Here's it:

    [Tue Nov 02 01:14:19.033933 2021] [proxy_fcgi:error] [pid 1160231:tid 140464824301312] [client 79.11.231.218:50806] AH01071: Got error 'PHP message: PHP Warning: require_once(/srv/infor/htdocs/moodle/local/uploadnotification/classes/../../changeloglib/classes/backup_lib.php): failed to open stream: No such file or directory in /srv/infor/htdocs/moodle/local/uploadnotification/classes/changelog.php on line 29
    PHP message: PHP Fatal error: require_once(): Failed opening required '/srv/infor/htdocs/moodle/local/uploadnotification/classes/../../changeloglib/classes/backup_lib.php' (include_path='/srv/infor/htdocs/moodle/lib/pear:.:/usr/share/php') in /srv/infor/htdocs/moodle/local/uploadnotification/classes/changelog.php on line 29'
  • Guido Roessling
    Tue, 2 Nov 2021, 12:50 PM
    Thank you for the log, which indeed explains the problem. As mentioned in both the requirements and the installation guide (step 1), you need to install local_changeloglib first to remove the issue. The white page appears because a file that is „required“ by PHP does not exist (because the other plugin wasn‘t installed), which crashes the PHP execution right at the start of the plugin.
    Install local_changeloglib (as linked in the article), and you should be fine.
  • Simone Berger
    Tue, 2 Nov 2021, 5:18 PM
    Ok, I'm going to install it, thanks. Out of curiosity, would it be possible to specify that plugin as a dependency for this one so that Moodle automatically checks for its presence before installing this? I know it's written here, but it seems there's a common attitude (including me) to install things without reading the docs in advance...
  • Guido Roessling
    Tue, 2 Nov 2021, 9:40 PM
    Hi Simone,
    I do not see any option to actually specify dependencies for plugins (there is a requirements section, but that does not enforce dependency checks)...
    Viele Grüße,

    Guido
1 2 3
Please login to post comments