Statistics: Difference between revisions
Mary Cooch (talk | contribs) (new path to statistics) |
Mary Cooch (talk | contribs) mNo edit summary |
||
(9 intermediate revisions by 5 users not shown) | |||
Line 2: | Line 2: | ||
If statistics are enabled for the site, graphs and tables of user activity may be generated. | If statistics are enabled for the site, graphs and tables of user activity may be generated. | ||
[[File: | [[File:StatisticsView.png|center|thumb|500px]] | ||
The statistics graphs and tables show how many '''hits''' there have been on various parts of your site during various time frames. They '''do not''' show how many distinct users there have been. They are processed daily at a time you specify. You must enable statistics before you will see anything. | The statistics graphs and tables show how many '''hits''' there have been on various parts of your site during various time frames. They '''do not''' show how many distinct users there have been. They are processed daily at a time you specify. You must enable statistics before you will see anything. | ||
Line 8: | Line 8: | ||
==Enabling statistics== | ==Enabling statistics== | ||
Statistics must be enabled by a site administrator in '' | Statistics must be enabled by a site administrator in ''Administration > Site administration > Advanced features''. | ||
In Moodle 2.4.2 onwards, once statistics have been enabled, the screen to configure them becomes visible as a link in '' | In Moodle 2.4.2 onwards, once statistics have been enabled, the screen to configure them becomes visible as a link in ''Administration > Site administration > Server > Statistics''. (In older versions the link was always available irrespective of whether statistics was enabled.) | ||
The Course overview report will also then be accessible from ''Administration> Site administration > Reports''. | The Course overview report will also then be accessible from ''Administration> Site administration > Reports''. | ||
Line 16: | Line 16: | ||
==Site administration settings== | ==Site administration settings== | ||
Various settings for statistics may be set by an administrator in '' | Various settings for statistics may be set by an administrator in ''Administration > Site administration > Server > Statistics''. | ||
As stats processing is quite resource intensive, it is recommended that you should set the stats processing to start in the early morning. | As stats processing is quite resource intensive, it is recommended that you should set the stats processing to start in the early morning. | ||
Line 24: | Line 24: | ||
==Statistics not working?== | ==Statistics not working?== | ||
If statistics isn't working and you have checked all the obvious (such as whether it's enabled), check '' | If statistics isn't working and you have checked all the obvious (such as whether it's enabled), check ''Administration > Site administration > Plugins > Activity modules'' for any old hidden modules in the database which miss the files in the ''moodle/mod'' folder on your server. If you find any, they should be deleted. | ||
You can also try limiting the length of time logs are kept for to reduce the size of the tables. Go to '' | You can also try limiting the length of time logs are kept for to reduce the size of the tables. Go to ''Site administration > Plugins > Logging > Standard log''. | ||
To run stats manually, go to the database, go to the mdl_config table and set statslastdaily, statslastweekly and statslastmonthly to 0 (leave statslastmonthly alone if you think it might be large logtables causing the problem). Then go to '' | To run stats manually, go to the database, go to the mdl_config table and set statslastdaily, statslastweekly and statslastmonthly to 0 (leave statslastmonthly alone if you think it might be large logtables causing the problem). Then go to ''Administration > Site administration > Server > Scheduled tasks'' and look for the task "Background processing for statistics"; set this to be a minute or two into the future by adjusting the hour and minute values. If you manually run cron, you should see output there showing that stats are processing, but be patient if it appears to hang - this can take between 5 mins and several hours depending on how big your site is, so just leave it going. Afterwards, you might want to return the Scheduled task's values back to asterisks so that it returns to the defined schedule. | ||
==Viewing statistics== | ==Viewing statistics== | ||
A manager, teacher or non-editing teacher (or any other user with the capability [[Capabilities/report/stats:view|report/stats:view]]) can view statistics for their course in '' | A manager, teacher or non-editing teacher (or any other user with the capability [[Capabilities/report/stats:view|report/stats:view]]) can view statistics for their course in ''Administration > Course administration > Reports > Statistics''. | ||
An administrator can view statistics for the site in '' | An administrator can view statistics for the site in ''Administration > Site administration > Reports > Statistics''. | ||
[[Category:Site administration]] | [[Category:Site administration]] | ||
[[de:Statistiken]] | |||
[[es:Estadísticas]] | |||
[[fr:Statistiques]] | [[fr:Statistiques]] | ||
Latest revision as of 08:38, 12 October 2017
If statistics are enabled for the site, graphs and tables of user activity may be generated.
The statistics graphs and tables show how many hits there have been on various parts of your site during various time frames. They do not show how many distinct users there have been. They are processed daily at a time you specify. You must enable statistics before you will see anything.
Enabling statistics
Statistics must be enabled by a site administrator in Administration > Site administration > Advanced features.
In Moodle 2.4.2 onwards, once statistics have been enabled, the screen to configure them becomes visible as a link in Administration > Site administration > Server > Statistics. (In older versions the link was always available irrespective of whether statistics was enabled.)
The Course overview report will also then be accessible from Administration> Site administration > Reports.
Site administration settings
Various settings for statistics may be set by an administrator in Administration > Site administration > Server > Statistics.
As stats processing is quite resource intensive, it is recommended that you should set the stats processing to start in the early morning.
- TIP: Set the stats processing to start an hour before your automated course backups are scheduled to start, then set the maximum runtime to 1 hour. This ensures that stats are not being processed at the same time as course backups are being made.
Statistics not working?
If statistics isn't working and you have checked all the obvious (such as whether it's enabled), check Administration > Site administration > Plugins > Activity modules for any old hidden modules in the database which miss the files in the moodle/mod folder on your server. If you find any, they should be deleted.
You can also try limiting the length of time logs are kept for to reduce the size of the tables. Go to Site administration > Plugins > Logging > Standard log.
To run stats manually, go to the database, go to the mdl_config table and set statslastdaily, statslastweekly and statslastmonthly to 0 (leave statslastmonthly alone if you think it might be large logtables causing the problem). Then go to Administration > Site administration > Server > Scheduled tasks and look for the task "Background processing for statistics"; set this to be a minute or two into the future by adjusting the hour and minute values. If you manually run cron, you should see output there showing that stats are processing, but be patient if it appears to hang - this can take between 5 mins and several hours depending on how big your site is, so just leave it going. Afterwards, you might want to return the Scheduled task's values back to asterisks so that it returns to the defined schedule.
Viewing statistics
A manager, teacher or non-editing teacher (or any other user with the capability report/stats:view) can view statistics for their course in Administration > Course administration > Reports > Statistics.
An administrator can view statistics for the site in Administration > Site administration > Reports > Statistics.