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

Deprecate callback delete_course

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.2
    • Component/s: Course, Events API
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a course with activities and questions
      2. Delete the course
      3. There should be no errors
      4. Install course format topcoll
      5. Create another course (does not matter in which format)
      6. Delete it, there should be a warning message about deprecated callback
      Show
      Create a course with activities and questions Delete the course There should be no errors Install course format topcoll Create another course (does not matter in which format) Delete it, there should be a warning message about deprecated callback
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      wip-MDL-53292-master

      Description

      While working on MDL-44078 I noticed that callback delete_course is not needed - same functionality may be achieved by observing event core\event\course_content_deleted

      For information: Event core\event\course_content_deleted is triggered when course is deleted, when another course is restored into the current with deleting contents (both "Restore" and "Import" operations).
      Event core\event\course_deleted is only triggered when the course is deleted completely. Callback "delete_course" was called on deleting contents and not deleting course. Bad naming is another reason to get rid of the callback.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marina Marina Glancy
              Reporter:
              marina Marina Glancy
              Peer reviewer:
              Simey Lameze
              Integrator:
              Andrew Nicols
              Tester:
              Mark Nelson
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/Dec/16