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

Sql error on accesing at uploaded tasks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.2.6, 3.3.3, 3.4
    • Fix Version/s: None
    • Component/s: Assignment
    • Labels:

      Description

      We had a similar error some days ago since a plesk update of php to 7.1.12.

      It does not happen on 7.0.26 (this are the release branches of php that plesk uses), right now we are reverting to 7.0.26 with the same configs to solve the problem but wanted to inform it.

      The last error was on all uploaded tasks.

      We corrected it from an upgrade from 3.2 to latest weekly 3.4 a week ago.

      But this problem reapeared but only on task that have restrictions to some groups.

       

      I add the actual error text:

       

      Notice: Undefined offset: 0 in /var/www/vhosts/xxx/httpdocs/moodle/lib/accesslib.php on line 3456

      Warning: array_keys() expects parameter 1 to be array, null given in /var/www/vhosts/xxx/httpdocs/moodle/lib/accesslib.php on line 3456

      Warning: implode(): Invalid arguments passed in /var/www/vhosts/xxx/httpdocs/moodle/lib/accesslib.php on line 3456

      Notice: Undefined offset: 0 in /var/www/vhosts/xxx/httpdocs/moodle/lib/accesslib.php on line 3461

      Warning: array_keys() expects parameter 1 to be array, null given in /var/www/vhosts/xxx/httpdocs/moodle/lib/accesslib.php on line 3461

      Warning: implode(): Invalid arguments passed in /var/www/vhosts/xxx/httpdocs/moodle/lib/accesslib.php on line 3461
      Error al leer de la base de datos

      Más información sobre este error
       
      Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')
      AND userid NOT IN (
      ' at line 6
      SELECT u.id
      FROM user u
      LEFT OUTER JOIN user_lastaccess ul ON (ul.userid = u.id AND ul.courseid = 68)
      JOIN (SELECT DISTINCT userid FROM ( SELECT userid
      FROM role_assignments
      WHERE contextid IN (1,15,56,4137) AND roleid IN ()
      AND userid NOT IN (
      SELECT userid
      FROM role_assignments
      WHERE contextid IN (1,15,56,4137)
      AND roleid IN ()
      ) ) us) ra ON ra.userid = u.id
      WHERE u.deleted = 0 AND u.id <> ?
      ORDER BY ul.timeaccess
      [array (
      0 => '1',
      )]
      Error code: dmlreadexception
       
      Stack trace:

      • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
      • line 1216 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 3490 of /lib/accesslib.php: call to mysqli_native_moodle_database->get_records_sql()
      • line 73 of /availability/classes/capability_checker.php: call to get_users_by_capability()
      • line 217 of /availability/condition/group/classes/condition.php: call to core_availability\capability_checker->get_users_by_capability()
      • line 340 of /availability/classes/tree.php: call to availability_group\condition->filter_user_list()
      • line 640 of /availability/classes/info.php: call to core_availability\tree->filter_user_list()
      • line 106 of /availability/classes/info_module.php: call to core_availability\info->filter_user_list()
      • line 2021 of /mod/assign/locallib.php: call to core_availability\info_module->filter_user_list()
      • line 2128 of /mod/assign/locallib.php: call to assign->list_participants()
      • line 5329 of /mod/assign/locallib.php: call to assign->count_participants()
      • line 5384 of /mod/assign/locallib.php: call to assign->get_assign_grading_summary_renderable()
      • line 615 of /mod/assign/locallib.php: call to assign->view_submission_page()
      • line 55 of /mod/assign/view.php: call to assign->view()

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              zig Zig Tan (Inactive)
              Reporter:
              S.deamorin Sergio
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: