Auto mail course enrollment count

Re: Auto mail course enrollment count

by Tim Hunt -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Does the user_enrolments table have a timecreated field?

Yes, it does https://github.com/moodle/moodle/blob/master/lib/db/install.xml#L274

You need to know that in Moodle, dates are stored as an integer unix timestamp. But, if you are using report_customsql, with a weekly scheduled query, that just mean adding

WHERE ue.timecreated BETWEEN %%STARTTIME% AND %%ENDTIME%%

just above the group-by line.