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

Recent Activities report gives 'Error reading from database' for separate groups course

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.0.5, 2.1.2
    • 2.0.3, 2.1.1, 2.2
    • Course
    • Any
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • w36_MDL-29131_m22_recentsep
    • Hide

      See the attached patch.

      Show
      See the attached patch.
    • Hide

      1. Create a course, set it as Separate Groups.
      2. Add Recent Activity block.
      3. Enrol users, add them to groups.
      4. Log in as a user, enter the course, click on "Full report of recent activity..."
      5. repeat the tests for all combinations of group modes+accessallgroups+groupings
      Example of output:

      Error reading from database

      More information about this error
      Debug info: ERROR: invalid input syntax for integer: "Array"
      SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email
      FROM mdl_user u
      JOIN (SELECT DISTINCT eu1_u.id
      FROM mdl_user eu1_u
      JOIN mdl_groups_members eu1_gm ON (eu1_gm.userid = eu1_u.id AND eu1_gm.groupid = $1)
      JOIN mdl_user_enrolments eu1_ue ON eu1_ue.userid = eu1_u.id
      JOIN mdl_enrol eu1_e ON (eu1_e.id = eu1_ue.enrolid AND eu1_e.courseid = $2)
      WHERE eu1_u.deleted = 0 AND eu1_u.id <> $3) je ON je.id = u.id
      WHERE u.deleted = 0 ORDER BY u.lastname ASC, u.firstname ASC
      [array (
      0 =>
      array (
      0 => 178,
      ),
      1 => '378',
      2 => '1',
      )]
      Stack trace:

      line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 232 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      line 678 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      line 3259 of /lib/accesslib.php: call to pgsql_native_moodle_database->get_records_sql()
      line 63 of /course/recent_form.php: call to get_enrolled_users()
      line 152 of /lib/formslib.php: call to recent_form->definition()
      line 59 of /course/recent.php: call to moodleform->moodleform()

      Show
      1. Create a course, set it as Separate Groups. 2. Add Recent Activity block. 3. Enrol users, add them to groups. 4. Log in as a user, enter the course, click on "Full report of recent activity..." 5. repeat the tests for all combinations of group modes+accessallgroups+groupings Example of output: Error reading from database More information about this error Debug info: ERROR: invalid input syntax for integer: "Array" SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email FROM mdl_user u JOIN (SELECT DISTINCT eu1_u.id FROM mdl_user eu1_u JOIN mdl_groups_members eu1_gm ON (eu1_gm.userid = eu1_u.id AND eu1_gm.groupid = $1) JOIN mdl_user_enrolments eu1_ue ON eu1_ue.userid = eu1_u.id JOIN mdl_enrol eu1_e ON (eu1_e.id = eu1_ue.enrolid AND eu1_e.courseid = $2) WHERE eu1_u.deleted = 0 AND eu1_u.id <> $3) je ON je.id = u.id WHERE u.deleted = 0 ORDER BY u.lastname ASC, u.firstname ASC [array ( 0 => array ( 0 => 178, ), 1 => '378', 2 => '1', )] Stack trace: line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown line 232 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end() line 678 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end() line 3259 of /lib/accesslib.php: call to pgsql_native_moodle_database->get_records_sql() line 63 of /course/recent_form.php: call to get_enrolled_users() line 152 of /lib/formslib.php: call to recent_form->definition() line 59 of /course/recent.php: call to moodleform->moodleform()

      Recent Activities full report gives 'Error reading from database' for separate groups course

            skodak Petr Skoda
            badblock Kirill Astashov
            Sam Hemelryk Sam Hemelryk
            Rajesh Taneja Rajesh Taneja
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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