Moodle
  1. Moodle
  2. MDL-30934

DB exception when force deleting modules.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2.1
    • Component/s: Course
    • Labels:
      None
    • Database:
      Any
    • Testing Instructions:
      Hide

      1/ create a new course
      2/ add instance of mod_folder for example
      3/ add some other activities
      4/ delete /mod/folder directory
      5/ delete the course

      Show
      1/ create a new course 2/ add instance of mod_folder for example 3/ add some other activities 4/ delete /mod/folder directory 5/ delete the course
    • Workaround:
      Hide

      Change 'module' to 'modules' in moodlelib.php

      Show
      Change 'module' to 'modules' in moodlelib.php
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w52_MDL-30934_m23_modules

      Description

      NOTE: v2.2 (commit: 929c26ccf1cb483149d56c1961ed8ad655437463)
      -------------------------------------------------------------
      If the execution reaches line 4401 of moodlelib.php:

      if ($module = $DB->get_record('module', array('id'=>$cm->module))) {

      an exception will be thrown after the statement since there is no table named 'module'. I believe the table name should be 'modules' instead of 'module'.

        Gliffy Diagrams

          Activity

          Hide
          Petr Skoda added a comment -

          Thanks a lot for the report and proposed patch.

          Show
          Petr Skoda added a comment - Thanks a lot for the report and proposed patch.
          Hide
          Petr Skoda added a comment -

          To integrators: please cherry pick to 2.2.x

          Thanks a lot for the report!

          Show
          Petr Skoda added a comment - To integrators: please cherry pick to 2.2.x Thanks a lot for the report!
          Hide
          Sam Hemelryk added a comment -

          Spot on thanks Petr - this has been integrated now

          Show
          Sam Hemelryk added a comment - Spot on thanks Petr - this has been integrated now
          Hide
          Tim Barker added a comment -

          Was able to delete course after directory was removed without database exception.

          Show
          Tim Barker added a comment - Was able to delete course after directory was removed without database exception.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The git and cvs repositories are happy receiving your very first contribution to Moodle for 2012. Happy new year!

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The git and cvs repositories are happy receiving your very first contribution to Moodle for 2012. Happy new year! Closing, ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: