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

migrate pre_course_delete callback to hook

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor 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

      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.

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

              Created:
              Updated:

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