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

Add a course_restored event trigger

    Details

      Description

      It would be handy to be able to run other processes after a course has been restored.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for putting that up. Hopefully we'll catch up on peer reviewing now that 2.4 is released.

            Show
            salvetore Michael de Raadt added a comment - Thanks for putting that up. Hopefully we'll catch up on peer reviewing now that 2.4 is released.
            Hide
            skodak Petr Skoda added a comment - - edited

            +1, please submit for integration

            Show
            skodak Petr Skoda added a comment - - edited +1, please submit for integration
            Hide
            bushido Mark Nielsen added a comment -

            Hey Petr, I cannot move tickets past peer review. Perhaps you or someone else could?

            Show
            bushido Mark Nielsen added a comment - Hey Petr, I cannot move tickets past peer review. Perhaps you or someone else could?
            Hide
            skodak Petr Skoda added a comment -

            submitted for integration, thanks

            Show
            skodak Petr Skoda added a comment - submitted for integration, thanks
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated to master. Thanks a lot Mark!

            Show
            poltawski Dan Poltawski added a comment - Integrated to master. Thanks a lot Mark!
            Hide
            rwijaya Rossiani Wijaya added a comment -

            This is working as expected.

            Tested for master only.

            Test passed.

            Show
            rwijaya Rossiani Wijaya added a comment - This is working as expected. Tested for master only. Test passed.
            Hide
            damyon Damyon Wiese added a comment -

            Congratulations! This issue has been resolved. Thanks for helping to make Moodle better for everyone!

            Regards, Damyon

            Show
            damyon Damyon Wiese added a comment - Congratulations! This issue has been resolved. Thanks for helping to make Moodle better for everyone! Regards, Damyon
            Hide
            rex Rex Lorenzo added a comment - - edited

            Just a note, I incorporated this patch, but found that when duplicating course modules triggers the "course_restored" event. Is that intended?

            If so, how do I detect if the "course_restored" is an actual restore vs a duplicate in my event handlers? I looked at the event data being returned and it doesn't seem to indicate this.

            Show
            rex Rex Lorenzo added a comment - - edited Just a note, I incorporated this patch, but found that when duplicating course modules triggers the "course_restored" event. Is that intended? If so, how do I detect if the "course_restored" is an actual restore vs a duplicate in my event handlers? I looked at the event data being returned and it doesn't seem to indicate this.
            Hide
            bushido Mark Nielsen added a comment -

            Hey Rex, the event handler does get the various settings of the backup, like the target. Checkout the backup class for the constants. Depending on what you want to capture, you may only want backup::TARGET_NEW_COURSE. Hope that helps!

            Show
            bushido Mark Nielsen added a comment - Hey Rex, the event handler does get the various settings of the backup, like the target. Checkout the backup class for the constants. Depending on what you want to capture, you may only want backup::TARGET_NEW_COURSE. Hope that helps!

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/13