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

New table in Advanced grading causes upgrade from 2.1 to 2.2 to fail

    XMLWordPrintable

Details

    Description

      A 'Global search' block is being deleted in upgrade process, which calls context_helper::delete_instance (upgrade.php:6822)
      This is called before Advanced grading tables are created (upgrade.php:6833), but the advanced grading table is accessed.

      -->System
      Default exception handler: Error reading from database Debug: Table 'moodle.grading_areas' doesn't exist
      SELECT id FROM grading_areas WHERE contextid = ?
      [array (
        0 => '8229',
      )]
      * line 394 of /lib/dml/moodle_database.php: dml_read_exception thrown
      * line 841 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      * line 1394 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_fieldset_sql()
      * line 577 of /grade/grading/lib.php: call to moodle_database->get_fieldset_select()
      * line 4907 of /lib/accesslib.php: call to grading_manager::delete_all_for_context()
      * line 4928 of /lib/accesslib.php: call to context->delete_content()
      * line 5413 of /lib/accesslib.php: call to context->delete()
      * line 6822 of /lib/db/upgrade.php: call to context_helper::delete_instance()
      * line 1397 of /lib/upgradelib.php: call to xmldb_main_upgrade()
      * line 146 of /admin/cli/upgrade.php: call to upgrade_core()
      * line 1 of Command line code: call to require_once()
       
      !!! Error reading from database !!!
      !! Table 'moodle.grading_areas' doesn't exist
      SELECT id FROM grading_areas WHERE contextid = ?
      [array (
        0 => '8229',
      )] !!
      !! Stack trace: * line 394 of /lib/dml/moodle_database.php: dml_read_exception thrown
      * line 841 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      * line 1394 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_fieldset_sql()
      * line 577 of /grade/grading/lib.php: call to moodle_database->get_fieldset_select()
      * line 4907 of /lib/accesslib.php: call to grading_manager::delete_all_for_context()
      * line 4928 of /lib/accesslib.php: call to context->delete_content()
      * line 5413 of /lib/accesslib.php: call to context->delete()
      * line 6822 of /lib/db/upgrade.php: call to context_helper::delete_instance()
      * line 1397 of /lib/upgradelib.php: call to xmldb_main_upgrade()
      * line 146 of /admin/cli/upgrade.php: call to upgrade_core()
      * line 1 of Command line code: call to require_once()
       !!

      Attachments

        Issue Links

          Activity

            People

              skodak Petr Skoda
              marina Marina Glancy
              Aparup Banerjee Aparup Banerjee
              Aparup Banerjee Aparup Banerjee
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5/Dec/11