Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-8381

Weekly statistics never catch up

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9
    • 1.6.4
    • General
    • None
    • MOODLE_16_STABLE
    • MOODLE_19_STABLE

      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...

            skodak Petr Skoda
            samulik Samuli Karevaara
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.