Moodle

Functions [mod name]_get_daily_stats referenced in lib/statslib.php but not defined anywhere.

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6.2
  • Fix Version/s: 1.9
  • Component/s: Administration
  • Labels:
    None
  • Affected Branches:
    MOODLE_16_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

The stats_cron_daily() function in the file lib/statslib.php is checking for the existance of the functions $mod->name."_get_daily_stats" (line 85) and then building an array containing those function names. The problem is that for all of the Moodle modules, these functions do not exist so an empty array of function names (which are supposed to be executed by the cron job) are being passed to the function stats_do_daily_user_cron().

The end result is that the cron job is running successfully, but no actual process of statistics is taking place and the mdl_stats_daily table in the database is remaining empty.

Issue Links

Activity

Hide
Dan Weeks added a comment -

I have finally managed to find someone with the same issue
I have tracked the bug down to the same loop but in version 1.8, the array of functions has nothing in it!

Show
Dan Weeks added a comment - I have finally managed to find someone with the same issue I have tracked the bug down to the same loop but in version 1.8, the array of functions has nothing in it!
Hide
Petr Škoda (skodak) added a comment -

should be fixed now, thanks for the report

Show
Petr Škoda (skodak) added a comment - should be fixed now, thanks for the report

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: