Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5706

Recent Activity Report Error (DML Read Exception)

XMLWordPrintable

    • MOODLE_28_STABLE
    • MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE

      SQL Server:

      • PostgreSQL 9.1.14
      • Ubuntu 12.04.5 LTS

      Web Server:

      • PHP Version 5.5.22-1+deb.sury.org~precise+1
      • Apache/2.2.22 (Ubuntu)
      • Moodle 2.8.5+ (Build: 20150424)
      • Questionnaire: 2014111002 2.8.2 (Build - 2015031901)
      • questionnaire_usergraph (default): yes

      In a course using either topics or weeks format add a questionnaire activity to the course and the recent activity block will no longer display activity. Clicking on the 'full activity report' link will result in an 'error reading from database' message. Turning on debugging will give the following output:

      ```Debug info: ERROR: operator does not exist: bigint = character varying
      LINE 5: JOIN mdl_user u ON u.id = qr.username
      ^
      HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.

      SELECT qr.*,
      u.id AS useridagain,u.picture,u.firstname,u.lastname,u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.imagealt,u.email
      FROM mdl_questionnaire_response qr
      JOIN mdl_user u ON u.id = qr.username

      WHERE qr.submitted > $1
      AND qr.survey_id = $2

      ORDER BY qr.submitted ASC
      [array (
      0 => 1428712858,
      1 => '60',
      )]
      Error code: dmlreadexception
      Stack trace:

      line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 244 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      line 764 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      line 793 of /mod/questionnaire/lib.php: call to pgsql_native_moodle_database->get_records_sql()
      line 167 of /course/recent.php: call to questionnaire_get_recent_mod_activity()```

      Courses without a questionnaire activity function as expected. Attached are images of the block and the activity report page with debugging turned OFF. This has affected 2.8.4 and 2.8.5 that I'm aware of.

            mchurch Mike Churchward
            dwahl Daniel Wahl
            Votes:
            0 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.