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

Course participation report fatal error

XMLWordPrintable

    • MOODLE_28_STABLE
    • MOODLE_27_STABLE
    • 47631-28
    • Hide
      1. Create a course
      2. Enrol 30 students
      3. Browse to the course participation report
      4. Select a letter to filter users by firstname letter (making sure you'll have at least one result)
      5. Select to further filter users by lastname letter (making sure you'll have at least one result).
      6. If you got the expected result without any fatal errors it can be passed.

      Note if you use groups there is another issue there MDL-47077 is to fix that.

      Show
      Create a course Enrol 30 students Browse to the course participation report Select a letter to filter users by firstname letter (making sure you'll have at least one result) Select to further filter users by lastname letter (making sure you'll have at least one result). If you got the expected result without any fatal errors it can be passed. Note if you use groups there is another issue there MDL-47077 is to fix that.

      To reproduce:

      1. Create a course
      2. Enrol 30 students
      3. Browse to the course participation report
      4. Select a letter to filter users by (firstname or lastname, it doesn't matter)
      5. Boom!

      Debug info: ERROR: syntax error at or near "WHERE"
      LINE 15: ....alternatename,u.firstname,u.lastname, u.idnumber WHERE firs...
      ^
      SELECT ra.userid, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, u.idnumber, COUNT(l.actioncount) AS count
      FROM (SELECT DISTINCT userid FROM mdl_role_assignments WHERE contextid IN ($1,$2,$3) AND roleid = $4 ) ra
      JOIN mdl_user u ON u.id = ra.userid

      LEFT JOIN (
      SELECT userid, COUNT(crud) AS actioncount
      FROM mdl_logstore_standard_log
      WHERE contextinstanceid = $5
      AND timecreated > $6 AND crud IN ($7,$8,$9,$10)
      AND edulevel = $11
      AND anonymous = 0
      AND contextlevel = $12
      AND (origin = 'web' OR origin = 'ws')
      GROUP BY userid,timecreated) l ON (l.userid = ra.userid)
      GROUP BY ra.userid, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, u.idnumber WHERE firstname ILIKE $13 ESCAPE E'
      ' ORDER BY lastname DESC LIMIT 20 OFFSET 0
      [array (
      0 => '63',
      1 => '3',
      2 => '1',
      3 => 5,
      4 => 4,
      5 => 0,
      6 => 'c',
      7 => 'r',
      8 => 'u',
      9 => 'd',
      10 => 2,
      11 => 70,
      12 => 'L%',
      )]
      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 302 of /report/participation/index.php: call to pgsql_native_moodle_database->get_records_sql()

            samhemelryk Sam Hemelryk
            samhemelryk Sam Hemelryk
            Ankit Agarwal Ankit Agarwal
            Dan Poltawski Dan Poltawski
            Mark Nelson Mark Nelson
            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.