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

DB exception when force deleting modules.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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'.

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            rajivnavada Rajiv Navada
            Integrator:
            Sam Hemelryk
            Tester:
            Tim Barker
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Jan/12