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

Course deletion failed on question bank purging

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 1.9.11, 2.0
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      Deleting a course with the question in it I get an error message:

      Debug info: Unknown column 'course' in 'where clause'
      SELECT 'x' FROM mdl_question_categories WHERE course IS NULL AND id = ? LIMIT 0, 1
      [array (
      0 => '15',
      )]
      Stack trace:
      line 391 of \lib\dml\moodle_database.php: dml_read_exception thrown
      line 691 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1540 of \lib\dml\moodle_database.php: call to mysqli_native_moodle_database->get_recordset_sql()
      line 1525 of \lib\dml\moodle_database.php: call to moodle_database->record_exists_sql()
      line 1509 of \lib\dml\moodle_database.php: call to moodle_database->record_exists_select()
      line 2269 of \lib\questionlib.php: call to moodle_database->record_exists()
      line 654 of \lib\questionlib.php: call to sort_categories_by_tree()
      line 4186 of \lib\moodlelib.php: call to question_delete_course()
      line 4048 of \lib\moodlelib.php: call to remove_course_contents()
      line 69 of \course\delete.php: call to delete_course()

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            oa_sychev Oleg Sychev
            Tester:
            Nobody
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              24/Nov/10