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

Course reset fails when the corresponding table for old modules doesn't exist

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.7, 2.2.4, 2.3.1, 2.4
    • 2.2.5, 2.3.2
    • Course
    • Any
    • MOODLE_20_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • wip-mdl-31623
    • Hide

      Attached code change for 2.1.2

      Show
      Attached code change for 2.1.2
    • Hide

      Simulate the module table not there :-

      alter table mdl_quiz rename to mdl_quiz_old;

      Run course/reset.php

      Show
      Simulate the module table not there :- alter table mdl_quiz rename to mdl_quiz_old; Run course/reset.php

    Description

      Course reset fails when the corresponding table for old modules doesn't exist.

      Error reading from database Debug: ERROR: relation "mdl_tlecontribute" does not exist at character 24\nSELECT COUNT('x') FROM mdl_tlecontribute WHERE course = $1\n[array (\n 0 => 127,\n)]

      OR

      Field "course" does not exist in table "quiz"

      I believe this happens if the module doesn't remove the entry in the modules table when it is removed from the system.

      Attachments

        Issue Links

          Activity

            People

              rajeshtaneja Rajesh Taneja
              tlock Tim Lock
              Frédéric Massart Frédéric Massart
              Aparup Banerjee Aparup Banerjee
              Andrew Davis Andrew Davis
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Raquel Ortega, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Sep/12