Need Statistics to show in Moodle ?
We normally try to put freeware and solutions for all users; however this seems to be a problem with Higher Education that use Moodle.
FIRST – In the Date section in your php.ini file – find the line ;date.timezone =, remove the semi-colon from the front of it and set it to the timezone that you have set in Administration > Locations (In the Moodle Administration Settings). (Mine is America/Chicago). The line in your ini file should look like this date.timezone =’American/Chicago’ . Save the php.ini and the locations set in Moodle under the Server’s time. Restart IIS or Apache.
Go to – Modules | Blocks | Statistics Enter at least 90 days on the graph – Save your settings
Go to – Server | Statistics | Disable Statistics in Moodle |Enter Maximum Processing – All | Enter Maximum Runtime – Until Complete | Enter Days to process 365 | Enter a Run Time 5-20 minutes before your current time on your computer (try to do this when at a Time when the server is not in use or has low usage – I am doing this at 12:40 a.m. – the stat time is at 12:30 a.m.) Go down and Save your Changes! Yes, It is disabled at this point.
On the SQL Server run the following query –
delete from mdl_stats_daily;
delete from mdl_stats_weekly;
delete from mdl_stats_monthly;
delete from mdl_config where name like ‘%stats%’;
Open up Moodle and now Enable Statistics and SAVE
Run cron from the command line – (Windows users, at the command prompt type –
c:\php\php.exe -f C:\inetpub\wwwroot\admin\cron.php
This should have worked…good luck!
No Graph in Stats?
Go to Server | System Paths and make sure you specify GD is installed. You must also take away the ; in front of extension=php_gd2.dll in your php.ini file. If you modify your php.ini, you must restart your webserver.