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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.9.4
    • Fix Version/s: None
    • Component/s: Other
    • Labels:
    • Environment:
      Linux
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      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;

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              tlock Tim Lock
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: