直接从数据库获取统计信息

I need to retrieve the site wide stats directly from the DB to draw some diagrams, but moodle doesn't seem to entry anything into the mdl_stats_daily, mdl_stats_weekly, mdl_stats_user_daily and so on. I have enabled the site statistics in site administration -> advanced features, and looked a little at server -> statistics for changing how often the cron job runs for reports etc. I cannot find a specific cron job for the reports inside of admin/cli though, maybe its the regular cron job i have to run, i already ran that one. And whenever i access anything, nothing gets inserted into these tables. Can anyone point me in the right direction?? p.s i also purged all caches

Thanks

There are a few settings which determine if and when statistics are gathered and stored. The statistics will be drawn from the logs, and will require cron to run, though it may take a little while before the tables get populated.

If you're interested in raw data you could try to check the log table, or the logstores which contain more accurate information than the statistics report.