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

Deleting Courses Bug

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.4
    • Fix Version/s: 1.8.5, 1.9
    • Component/s: Course
    • Labels:
      None
    • Environment:
      Ubuntu 7.10 i386
      Apache 2.2.4
      MySQL 5.0.45
      PHP 5.2.3
      Kernel Linux 2.6.22
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      There is an bug while Administrator deletes a course.

      moodle/lib/moodlelib.php: line 3012

      else {
      notify('Function', $moddelete() . 'doesn\'t exist!');
      $result = false;
      }

      This ''notify'' line makes a bug. ''$moddelete'' is one of the function in some modules.
      However if there is no such a function that name $moddelete it goes ''else'' block that shown above.

      As you can see, in ''notify'' function we call the $moddelete function. However as I say, this else block is
      used when $moddelete function isn't existed.

      Therefore, it makes crash the course deleting process and stop.
      So user cannot delete any course when they use one of the modules that doen't have $moddelete functions(exactly $modname.'_delete_instance).

      Thus, the parenthesis next to ''$moddelete'' have to be removed and the code would be changed like that

      else {
      notify('Function', $moddelete. 'doesn\'t exist!');
      $result = false;
      }

      Thank you.

        Attachments

          Activity

            People

            • Assignee:
              poltawski Dan Poltawski
              Reporter:
              elaborate Beung-uk Ahn
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08