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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.7, 2.2.4, 2.3.1, 2.4
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Course
    • Database:
      Any
    • Testing Instructions:
      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
    • Workaround:
      Hide

      Attached code change for 2.1.2

      Show
      Attached code change for 2.1.2
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:
      wip-mdl-31623

      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

              Assignee:
              rajeshtaneja Rajesh Taneja
              Reporter:
              tlock Tim Lock
              Peer reviewer:
              Frédéric Massart Frédéric Massart
              Integrator:
              Aparup Banerjee Aparup Banerjee
              Tester:
              Andrew Davis Andrew Davis
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Sep/12