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

event mod_deleted is NOT triggered when delete mod through AJAX

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Course
    • Labels:
      None
    • Testing Instructions:
      Hide

      suitable for developers only:
      1/ create local plugin that handles the 'mod_deleted' event
      2/ verify it is triggered both via ajax and normal delete of activity

      Show
      suitable for developers only: 1/ create local plugin that handles the 'mod_deleted' event 2/ verify it is triggered both via ajax and normal delete of activity
    • Workaround:
      Hide

      See patch. The code is totally copied from course/mod.php

      Show
      See patch. The code is totally copied from course/mod.php
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE

      Description

      When in editing mode and AJAX is enabled, clicking the delete mod icon will request course/rest.php. It does remove the mod properly but forgets to trigger mod_deleted event.

      Any other modules depend on this event will not work.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            skodak Petr Skoda added a comment -

            Thanks for the report and patch!

            To integrators: please cherry pick to all 2.x branches

            Show
            skodak Petr Skoda added a comment - Thanks for the report and patch! To integrators: please cherry pick to all 2.x branches
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks guys, this has been integrated now

            Sunner thanks for the solution I've cherry-picked your changes to MOODLE_20_STABLE, MOODLE_21_STABLE, and master as they did not merge cleanly with master.

            Cheers
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks guys, this has been integrated now Sunner thanks for the solution I've cherry-picked your changes to MOODLE_20_STABLE, MOODLE_21_STABLE, and master as they did not merge cleanly with master. Cheers Sam
            Hide
            rwijaya Rossiani Wijaya added a comment -

            Test passed.

            Show
            rwijaya Rossiani Wijaya added a comment - Test passed.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            YTC !

            (aka, yay, thanks and ciao ) Closing.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - YTC ! (aka, yay, thanks and ciao ) Closing.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Oct/11