Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@skarya22
Copy link
Contributor

@skarya22 skarya22 commented Jul 20, 2023

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:

Testing instructions

  1. run mysql -A < SQL/New_patches/2023_07_19_Add_Media_Digest.sql
  2. Login as a user and open my preferences > notifications and confirm that 'Media: Email Digest of Recently Uploaded Files' has N/A beside it
  3. Login as admin and add the permission 'media_upload_digest' / 'Media files: Access to recently uploaded media notifications digest.' to the user
  4. 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
  5. 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)
  6. Upload a media file in a project that you are assigned to and make sure that you get a notification
  7. Upload a media file in a project that you are not assigned to and make sure that you do not get a notification
  8. Set your user to have multiple projects
  9. Upload a media file in multiple projects and make sure that you get a notification for both

Example of email

image

@skarya22 skarya22 self-assigned this Jul 20, 2023
@skarya22 skarya22 removed their assignment Aug 10, 2023
@jeffersoncasimir jeffersoncasimir self-assigned this Aug 10, 2023
Copy link
Contributor

@jeffersoncasimir jeffersoncasimir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as intended!

@jeffersoncasimir jeffersoncasimir added the Passed manual tests PR has been successfully tested by at least one peer label Aug 14, 2023
Copy link
Collaborator

@driusan driusan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String concatenation SQL needs to be fixed

@driusan
Copy link
Collaborator

driusan commented Dec 12, 2023

Is there user documentation somewhere on how to set this up? RTD? Module README? It looks like it needs a cron job.

@driusan driusan assigned skarya22 and unassigned driusan Oct 2, 2024
@skarya22 skarya22 removed their assignment Oct 3, 2024
@skarya22 skarya22 requested a review from driusan October 3, 2024 18:47
The media_upload_digest tool must be added to the Cron job for whatever frequency it should be run.
`php media_upload_digest.php [-days|-months|-years] [number] [-email (optional)]`

Further, each user that should receive the Media Upload Digest notifications should have the `media_upload_digest`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be listed in the permissions section above (around line 30)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated! Thanks

`php media_upload_digest.php [-days|-months|-years] [number] [-email (optional)]`

Further, each user that should receive the Media Upload Digest notifications should have the `media_upload_digest`
permission, and `Media: Email Digest of Recently Uploaded Files` activated in the notifications tab.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "the notifications tab"? I only see Upload/Edit and Browse

Copy link
Contributor Author

@skarya22 skarya22 Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry that was unclear, I meant the notifications tab of the My Preferences module. I have edited it to be more clear
image

@skarya22 skarya22 self-assigned this Oct 4, 2024
@skarya22 skarya22 requested a review from driusan October 4, 2024 17:14
@skarya22 skarya22 removed their assignment Oct 4, 2024
@maximemulder maximemulder added Project: CCNA Issue or PR related to the CCNA project and removed Priority: Projects labels Dec 2, 2024
@driusan driusan merged commit 78a5b16 into aces:main Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Passed manual tests PR has been successfully tested by at least one peer Project: CCNA Issue or PR related to the CCNA project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants