Moodle
  1. Moodle
  2. MDL-25808

"Error reading from database" when deleting child course

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.2
    • Component/s: Administration
    • Labels:
      None
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      15624

      Description

      Moodle respond "Error reading from database" when I delete a course that is enrolled in a meta course.

      The course gets deleted though.

      Debug info: 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 'user_enrolments' at line 1
      user_enrolments
      [array (
      )]
      Stack trace:

      • line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown
      • line 769 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 183 of /enrol/meta/locallib.php: call to mysqli_native_moodle_database->get_records_sql()
      • line ? of unknownfile: call to enrol_meta_handler::course_deleted()
      • line 296 of /lib/eventslib.php: call to call_user_func()
      • line 515 of /lib/eventslib.php: call to events_dispatch()
      • line 4147 of /lib/moodlelib.php: call to events_trigger()
      • line 73 of /course/delete.php: call to delete_course()

        Issue Links

          Activity

          Hide
          Dan Poltawski added a comment -

          I've fixed this and requesting pull from upstream in PULL-60

          Show
          Dan Poltawski added a comment - I've fixed this and requesting pull from upstream in PULL-60
          Hide
          Petr Škoda added a comment -

          closing, thanks

          Show
          Petr Škoda added a comment - closing, thanks

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: