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

Module updated/created event is called too early

    XMLWordPrintable

Details

    • MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MDL-29097_mod_update_create
    • Easy
    • Hide

      Create an activity module. Check no errors or warnings are generated.

      Edit an activity module's settings. Check no errors or warnings are generated.

      Moodle core doesn't actually consume the events it generates so the event generation cannot really be tested without writing additional code (http://docs.moodle.org/dev/Events_API).

      Show
      Create an activity module. Check no errors or warnings are generated. Edit an activity module's settings. Check no errors or warnings are generated. Moodle core doesn't actually consume the events it generates so the event generation cannot really be tested without writing additional code ( http://docs.moodle.org/dev/Events_API ).

    Description

      The event is basically called before some grade stuff and before the course cache has been rebuilt. To avoid having to do some trickery or rebuilding the course cache twice, just move the event triggers lower in the code. At the very least, this is now less code

      Attachments

        Activity

          People

            andyjdavis Andrew Davis
            bushido Mark Nielsen
            Sam Hemelryk Sam Hemelryk
            Aparup Banerjee Aparup Banerjee
            Jason Fowler Jason Fowler
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              12/Mar/12