Statistics not showing: Error code: nostatstodisplay

Statistics not showing: Error code: nostatstodisplay

by alan tygel -
Number of replies: 2

Hi,

After carefully reading several discussion topics about the same problem, I'm giving up and opening a new topic on this problem.

Problem description:

When I access: Participants > username > Reports > Statistics, I get the message:

Sorry, there is no available data to display

Debug info: 
Error code: nostatstodisplay
Stack trace:
line 495 of /lib/setuplib.php: moodle_exception thrown
line 118 of /report/stats/user.php: call to print_error()

When I access: Course > Reports > Statistics, I get a dropdown menu for choosing course, report type and time period, however, for every combination I get the message:

There is no available data for that combination of course and time period.


About my system:

Moodle Version: 3.1.2, running on Ubuntu 14.04.

Database:

Running

select * from mdl_stats_user_daily;

returns 144 results, while monthly and weekly are empty.

What I checked:

  • at Site Administration > Advanced features, Enable statistics is on
  • at Site Administration > Server > Scheduled Tasks , the Background processing for statistics has already run
  • When I manually run my cron , everything looks fine, as it can be seen in the attached log.


I would really appreciate any help!


best,

alan

Average of ratings: -
In reply to alan tygel

Re: Statistics not showing: Error code: nostatstodisplay

by Greg Milsted -

Not sure if this helps but we've just had a similar problem.

Stats appeared to run but data was not being inserted into our stats_user_daily table.

We had a problem with the data that was being compiled in the temporary tables (lib/statslib.php).

Turned out one of our activities was entering a userid as -1.  The stats_user tables datatypes are bigints and it could be our setup (mysql bug?) but it prevented our stats from compiling.  

We changed the userid field in the stats_user_daily/weekly/monthly tables to a different datatype (we've gone with varchar(25) until we locate the offending activity and remove it) and our stats are processing happily now.  

Hope this helps someone!

In reply to alan tygel

Re: Statistics not showing: Error code: nostatstodisplay

by Mauri Arroqui -

Hi All, 

I 've a similar problem as Alan. Alan, do you resolve it? 

The main difference with your case is  the result of 

select * from mdl_stats_user_daily;
In my case is empty. 

I don't know why, because students and teachers are working on it.  For some reason the table is not filled. 

Any help on this?

Thanks in advance!