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

Stats generation problem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.9.8
    • 1.9.4
    • Other
    • None
    • Centos Linux 4.6, MySQL 5, Apache 2, PHP 5.2.9
    • MySQL
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      One of our clients has a site, running 1.9.4+ (yes I know - they'll be upgrading soon) that has been running fone for a couple of years. All of a sudden, a couple of weeks ago, the stats generation started to fail overnight. THey've only just noticed and asked me to look into it. I increased the debug level and ran cron manually and got this:

      PHP Warning: array_merge(): Argument #2 is not an array in /var/www/vhosts/tripleaworkshops.ibo.org/httpdocs/lib/statslib.php on line 1273
      PHP Warning: array_unique(): The argument should be an array in /var/www/vhosts/tripleaworkshops.ibo.org/httpdocs/lib/statslib.php on line 1279
      PHP Warning: array_values(): The argument should be an array in /var/www/vhosts/tripleaworkshops.ibo.org/httpdocs/lib/statslib.php on line 1279
      PHP Warning: implode(): Invalid arguments passed in /var/www/vhosts/tripleaworkshops.ibo.org/httpdocs/lib/statslib.php on line 124
      Running daily statistics gathering, starting at 1255478400:
      .........PHP Notice: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) AS statsreads,
      (SELECT COUNT('x')
      ' at line 8

      INSERT INTO mdl_stats_user_daily (stattype, timeend, courseid, userid, statsreads, statswrites)

      SELECT 'activity' AS stattype, 1255564800 AS timeend, d.courseid, d.userid,
      (SELECT COUNT('x')
      FROM mdl_log l
      WHERE l.userid = d.userid AND
      l.course = d.courseid AND l.time >= 1255478400 AND l.time < 1255564800 AND
      l.action IN ()) AS statsreads,
      (SELECT COUNT('x')
      FROM mdl_log l
      WHERE l.userid = d.userid AND
      l.course = d.courseid AND l.time >= 1255478400 AND l.time < 1255564800 AND
      in /var/www/vhosts/tripleaworkshops.ibo.org/httpdocs/lib/weblib.php on line 6942
      ...error occured, completed 0 days of statistics.

      I have no idea what is causing this - the moodle code has not been updated for some time, and we haven;t made any changes to their site for months. Any idea what could be causing this?

      This is now really urgent.

      regards

      Sean K

            dongsheng Dongsheng Cai
            keoghs Sean Keogh
            Nobody Nobody
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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