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

migrate pre_course_delete callback to hook

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • 4.2.2
    • General
    • MOODLE_402_STABLE
    • Hide
      1. The changes should be fully covered by PHPUnit.
      2. Manual testing should be done by visiting the Hooks overview page and verifying the new hook is listed there (used by 3 plugins, deprecating pre_course_delete)
      3. Deprecation testing can be done by enabling debugging, turning on recycle bin and using only the first commit - you should get following debugging message in PHPUnit tests and when deleting courses:

      Debugging: Callback pre_course_delete in tool_recyclebin component should be migrated to new hook callback 

      Show
      The changes should be fully covered by PHPUnit. Manual testing should be done by visiting the Hooks overview page and verifying the new hook is listed there (used by 3 plugins, deprecating pre_course_delete) Deprecation testing can be done by enabling debugging, turning on recycle bin and using only the first commit - you should get following debugging message in PHPUnit tests and when deleting courses: Debugging: Callback pre_course_delete in tool_recyclebin component should be migrated to new hook callback

    Description

      The name of the hook could be core\hook\course_delete, please note that the "pre_" prefix is not necessary any more because this type of hooks is always executed before the action.

      In the future we could also add core\hook\course_is_deletable{}

      Example of current usage is recycle bin.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              skodak Petr Skoda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.