Feature: Send CSV Report as attachment #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Reference to Issue: #55
Hello,
To add the functionality for CSV attachment to be emailed to the user, we have explored using the File API and Messaging API to create a CSV File and attach it to the email body.
We were successfully able to add an option for the user, create the CSV File using the File API but the step involving fetching the file to attach always returns 'false'.
The moodle documentation for "Read File" states the below which might be the reason the below method does not work.
The Messaging API on the otherhand is able to accept file attachments, this has been added in the code in the PR too.
Would really appreciate your review. Additionally, for the "Read/Get File", we would love to get any tips or redirection to any alternate moodle functionality that we can use for plugins of type report to fix the missing functionality.