Moodle Plugins directory: Overview Statistics | Moodle.org

Overview Statistics
This Moodle add-on produces various site and course report charts. The code has been designed in a way that makes adding more reports easy.
For producing the graphs, Charts API module is used. The code is using modern Moodle development techniques and patterns, such as using LESS for producing CSS files and Shifter to compose the Javascript modules.
Available site level reports
Users logging in - per day chart displays the number of unique registered users (not visits) who accessed the site per day during the last month.
User countries chart displays the countries the users are coming from, based on their user profile field.
User preferred languages chart displays the UI languages the users have selected as preferred ones in their profiles.
Number of courses per category reports the number of courses in each course category, both recursively (including subcategories) and own courses only.
Number of courses per size displays the distribution graph of number of activities per course. That is, how many courses are there with 0-4 activities, 5-9 activities, 10-14 activities etc.
Available course level reports
Enrolled users chart displays the progress of user enrolments into the course based on estimated historical figures.
Author
This add-on is currently maintained by DualCube. It was written by David Mudrák david@moodle.com, @mudrd8mz.
Installation
- Extract the folder 'overviewstats' into your {Moodle root directory}/report/ folder
- Visit the main administration page (so called Notifications)
- Follow the installation wizard
Hi Oscar. HTTP error number 500 is a server side problem. Please search through your web server error logs for details.
Thank you for the plugin! I have tested it on Moodle 3.9 and it works. Recently, I upgraded a site to Moodle 3.10! When I open the overview statistics I'm getting this error:
Headers -> Status: 200
response:
Fatal error: require_once(): Failed opening required '...site root..../lib/coursecatlib.php'
(include_path='...site root..../lib/pear:.:/opt/cpanel/ea-php73/root/usr/share/pear') in ...site root..../report/overviewstats/classes/chart_courses.php on line 26
I checked the lib folder and the coursecatlib.php file is missing. I think this file has been removed in 3.10. Do you plan to update the plugin for v3.10?
Hello Thodoris. I just released a new version 1.4 for Moodle 3.9 and 3.10 that should have this fixed - thank to the patch by Eric Bram (see earlier comments).
become accessible
Problem HTTP ERROR 500 https://moodle.xxx.com/report/overviewstats/index.php
Maybe you can help how to fix the error?
Thanks for the help
Can you help with this?
Ubuntu 20.04.2 LTS
Moodle 3.11+ (Build: 20210701)
Error log:
"PHP message: PHP Warning: require_once(/storage/data/moodle/lib/coursecatlib.php): failed to open stream: No such file or directory in /storage/data/moodle/report/overviewstats/classes/chart_courses.php on line 26
File coursecatlib.php doesn't exist in directory moodle/lib/
If you update your overviewstats plugin to the latest version, your issue should be resolved.
how to trace for the problem?
it show from php-fpm:
[01-Nov-2021 07:06:11] WARNING: [pool moodle] child 95792, script '/dir/moodle/report/overviewstats/index.php' (request: "GET /report/overviewstats/index.php") executing too slow (24.026709 sec), logging
[01-Nov-2021 07:06:11] NOTICE: child 95792 stopped for tracing
[01-Nov-2021 07:06:11] NOTICE: about to trace 95792
[01-Nov-2021 07:06:11] NOTICE: finished trace of 95792
[01-Nov-2021 07:08:25] WARNING: [pool moodle] child 95832, script '/dir/moodle/report/overviewstats/index.php' (request: "GET /report/overviewstats/index.php") executing too slow (21.854876 sec), logging
[01-Nov-2021 07:08:25] NOTICE: child 95832 stopped for tracing
[01-Nov-2021 07:08:25] NOTICE: about to trace 95832
[01-Nov-2021 07:08:25] NOTICE: finished trace of 95832
it show from nginx:
2021/11/01 07:08:03 [debug] 96181#96181: *25 epoll add connection: fd:17 ev:80002005
2021/11/01 07:08:03 [debug] 96181#96181: *25 connect to unix:/var/run/php/php7.4-fpm-moodle.sock, fd:17 #28
2021/11/01 07:08:03 [debug] 96181#96181: *25 connected
2021/11/01 07:08:03 [debug] 96181#96181: *25 http upstream connect: 0
2021/11/01 07:08:03 [debug] 96181#96181: *25 posix_memalign: 000055BD6BE2A540:128 @16
2021/11/01 07:08:03 [debug] 96181#96181: *25 http upstream send request
2021/11/01 07:08:03 [debug] 96181#96181: *25 http upstream send request body
2021/11/01 07:08:03 [debug] 96181#96181: *25 chain writer buf fl:0 s:1432
2021/11/01 07:08:03 [debug] 96181#96181: *25 chain writer in: 000055BD6BDC3EC8
2021/11/01 07:08:03 [debug] 96181#96181: *25 writev: 1432 of 1432
2021/11/01 07:08:03 [debug] 96181#96181: *25 chain writer out: 0000000000000000
2021/11/01 07:08:03 [debug] 96181#96181: *25 event timer add: 17: 1800000:2444064580
2021/11/01 07:08:03 [debug] 96181#96181: *25 http finalize request: -4, "/report/overviewstats/index.php?" a:1, c:2
2021/11/01 07:08:03 [debug] 96181#96181: *25 http request count:2 blk:0
2021/11/01 07:08:03 [debug] 96181#96181: *25 http2 frame complete pos:00007F67163FB049 end:00007F67163FB049
2021/11/01 07:08:03 [debug] 96181#96181: *25 event timer del: 15: 2442444536
2021/11/01 07:08:03 [debug] 96181#96181: *25 http upstream request: "/report/overviewstats/index.php?"
2021/11/01 07:08:03 [debug] 96181#96181: *25 http upstream dummy handler
2021/11/01 07:08:50 [debug] 96181#96181: *25 http upstream request: "/report/overviewstats/index.php?"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http upstream process header
2021/11/01 07:08:50 [debug] 96181#96181: *25 malloc: 000055BD6BE3FA60:4096
2021/11/01 07:08:50 [debug] 96181#96181: *25 recv: eof:1, avail:-1
2021/11/01 07:08:50 [debug] 96181#96181: *25 recv: fd:17 216 of 4096
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi record byte: 01
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi record byte: 06
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi record byte: 00
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi record byte: 01
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi record byte: 00
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi record byte: BB
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi record byte: 05
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi record byte: 00
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi record length: 187
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi parser: 0
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi header: "Status: 500 Internal Server Error"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi parser: 0
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi header: "Expires: Thu, 19 Nov 1981 08:52:00 GMT"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi parser: 0
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi header: "Cache-Control: no-store, no-cache, must-revalidate"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi parser: 0
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi header: "Pragma: no-cache"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi parser: 0
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi header: "Content-type: text/html; charset=utf-8"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi parser: 1
2021/11/01 07:08:50 [debug] 96181#96181: *25 http fastcgi header done
2021/11/01 07:08:50 [debug] 96181#96181: *25 xslt filter header
2021/11/01 07:08:50 [debug] 96181#96181: *25 http2 header filter
2021/11/01 07:08:50 [debug] 96181#96181: *25 http2 push resources
2021/11/01 07:08:50 [debug] 96181#96181: *25 http2 output header: ":status: 500"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http2 output header: "server: nginx"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http2 output header: "date: Mon, 01 Nov 2021 00:08:50 GMT"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http2 output header: "content-type: text/html; charset=utf-8"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http2 output header: "expires: Thu, 19 Nov 1981 08:52:00 GMT"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http2 output header: "cache-control: no-store, no-cache, must-revalidate"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http2 output header: "pragma: no-cache"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http2 output header: "strict-transport-security: max-age=63072000"
2021/11/01 07:08:50 [debug] 96181#96181: *25 http2:5 create HEADERS frame 000055BD6BDC48C8: len:164 fin:0
2021/11/01 07:08:50 [debug] 96181#96181: *25 http cleanup add: 000055BD6BDC49C0
2021/11/01 07:08:50 [debug] 96181#96181: *25 http2 frame out: 000055BD6BDC48C8 sid:5 bl:1 len:164
2021/11/01 07:08:50 [debug] 96181#96181: *25 malloc: 000055BD6BE40A70:16384