Loris
Loris copied to clipboard
[Media] Upload Digest Notifications (Override from CCNA)
Brief summary of changes
- Introduction of a php script that can send users that opt-in a digest of the recently uploaded files to the media module for projects that they have permission to.
- Implements project separation ability in the notification system
- The script can be run with
php media_upload_digest.php [-days|-months|-years] [number] [-email (optional)]in the tools directory
CCNA Overrides Involved:
- https://github.com/aces/CCNA/pull/6302
- https://github.com/aces/CCNA/pull/6407
Testing instructions
- run
mysql -A < SQL/New_patches/2023_07_19_Add_Media_Digest.sql - Login as a user and open my preferences > notifications and confirm that 'Media: Email Digest of Recently Uploaded Files' has N/A beside it
- Login as admin and add the permission 'media_upload_digest' / 'Media files: Access to recently uploaded media notifications digest.' to the user
- Log back in as the user and go to the notifications tab, confirm the N/A is replaced with an empty tick box and add the 'Media: Email Digest of Recently Uploaded Files' notification
- Try to run the script and confirm the email arrives to your address or run lines 64 to 75 of media_upload_digest.php in your mysql to see which users it selects (should be just your user)
- Upload a media file in a project that you are assigned to and make sure that you get a notification
- Upload a media file in a project that you are not assigned to and make sure that you do not get a notification
- Set your user to have multiple projects
- Upload a media file in multiple projects and make sure that you get a notification for both
Example of email
Is there user documentation somewhere on how to set this up? RTD? Module README? It looks like it needs a cron job.