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

Monthly stats report generates a row of zeros with a row of correct stats for any report type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 1.9.4
    • Other
    • Linux
    • MOODLE_19_STABLE

      Hi,

      Two different Moodle sites are experiencing a row of zeros and a row of correct stats in the monthly report with any report type. The dates that the zeros start in the report & graph are completely different between the Moodle sites.

      It looks like the function stats_fix_zeros doesn't determine that the variant is handled in the stats code and then generates a row of zeros per month which is added to the stats report.

      By updating the report with this line to skip the zerofixed state everything looks fine.

      if (!empty($stat->zerofixed)) {
      continue;
      $missedlines[] = $stat->timeend;
      }

      Weekly report are fine in the same period :-

      Timeend: Sunday, 12 April 2009, 12:00 AM vs stats_get_base_monthly: Sunday, 12 April 2009, 12:00 AM;
      Timeend: Sunday, 5 April 2009, 01:00 AM vs stats_get_base_monthly: Sunday, 5 April 2009, 01:00 AM;
      Timeend: Sunday, 29 March 2009, 01:00 AM vs stats_get_base_monthly: Sunday, 29 March 2009, 01:00 AM;

      Monthly report aren't fine in the same period :-

      Timeend: Wednesday, 1 April 2009, 11:00 AM vs stats_get_base_monthly: Wednesday, 1 April 2009, 01:00 AM;
      Timeend: Sunday, 1 March 2009, 11:00 AM vs stats_get_base_monthly: Sunday, 1 March 2009, 01:00 AM;
      Timeend: Sunday, 1 February 2009, 11:00 AM vs stats_get_base_monthly: Sunday, 1 February 2009, 01:00 AM;
      Timeend: Thursday, 1 January 2009, 11:00 AM vs stats_get_base_monthly: Thursday, 1 January 2009, 01:00 AM;
      Timeend: Monday, 1 December 2008, 11:00 AM vs stats_get_base_monthly: Monday, 1 December 2008, 01:00 AM;
      Timeend: Saturday, 1 November 2008, 11:00 AM vs stats_get_base_monthly: Saturday, 1 November 2008, 01:00 AM;
      Timeend: Wednesday, 1 October 2008, 10:00 AM vs stats_get_base_monthly: Wednesday, 1 October 2008, 12:00 AM;

            moodle.com Moodle HQ
            tlock Tim Lock
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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