[2.3] Overnight report, results to email with attachment?

[2.3] Overnight report, results to email with attachment?

by tim st.clair -
Number of replies: 1
Picture of Plugin developers

I've a client who wants to pick up their reports each day for archiving purposes. I can see an option in the settings for when the cron will be run (time) and then on my sql reports there's an option "Auto run daily: Schedule this query to run each day (At night)". I can't find any clear documentation on this option. The "send_emails.php" file in the block plugin folder is also confusing - where is it used (if at all) ?

Ideally I'd like the report to generate a file (e.g. XLS) and then send it to a specified email address (ideally configurable but I could hard code it too).

The other option is to generate the file (again, XLS) onto some known location on disk and the client can organise a ftp pickup or whatever. This doesn't look to be a feature either.

Average of ratings: -
In reply to tim st.clair

Re: [2.3] Overnight report, results to email with attachment?

by Tim TO. -

Hi there,

Any results here on the best implementation, possibly using a local plugin for the cron that will run the SQL query and possibly use the PHPMailer class (although Moodle extends it on its own) .

Would love to hear a follow-up on this if any solutions have been drawn up.

Cheers.