Moodle

Weekly statistics never catch up

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.6.4
  • Fix Version/s: 1.9
  • Component/s: General
  • Labels:
    None
  • Affected Branches:
    MOODLE_16_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

I've been reporting bugs with very inaccurate "cause of the bug" ponderings, but here goes another one:

Our biggest Moodle never runs weekly and monthly statistics. It stopped doing those in November. It does all of the daily statistics though. However, in mdl_config the values for statslastweekly and statslastmonthly are very recent!

Looking at the code: stats_cron_weekly() does set_config('statslastweekly',time()); before is starts any processing. If it then runs out of time after just one minute, it still "reports" that the weekly stats were run "just five minutes ago". Then, if I'm not incorrect, next time the check for
if (isset($CFG->statslastweekly) and ((time() - (7*24*60*60)) <= $CFG->statslastweekly))
says that "no, it hasn't been a week since this was last run".

I'm not sure why it never progresses, but the logic of "we got this far" seems to be incorrect...

Issue Links

Activity

Hide
Samuli Karevaara added a comment -

Uh, there was no "Statistics / Logs / Reports" component, this is for Penny.

Show
Samuli Karevaara added a comment - Uh, there was no "Statistics / Logs / Reports" component, this is for Penny.
Hide
Petr Škoda (skodak) added a comment -

should be fixed in latest 1.9dev, thanks for the report - see linked meta bug for more details

Show
Petr Škoda (skodak) added a comment - should be fixed in latest 1.9dev, thanks for the report - see linked meta bug for more details

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: