Feature: Send CSV Report as attachment#86
Open
chalhoub-university wants to merge 6 commits intomoodleou:mainfrom
Open
Feature: Send CSV Report as attachment#86chalhoub-university wants to merge 6 commits intomoodleou:mainfrom
chalhoub-university wants to merge 6 commits intomoodleou:mainfrom
Conversation
Member
|
Why is it necessary to use the File API? - Oh, because the message API can only sent stored_files, not a temporary file. Well that is annoying. However, swtiching all files used by this plugin to be stored_files is not a good design change. And, it is not correct (e.g. report_customsql_delete_old_temp_files does not work with your changes.) Also, if possible, please ensure that the automated tests pass before opening a pull request. If it was me, I would first get a chagen into Moodle core, so that the message API could handle any file, and then use that to implement this feature here. |
Member
|
Also, before submitting, please clean up the git history. |
a6e426a to
29660f6
Compare
003c70f to
ce26f60
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.