Skip to content
  • Ruslan Kabalin's avatar
    MDL-67548 core_course: Add more category deletion hooks. · 72316a9f
    Ruslan Kabalin authored
    Introduce new hooks for plugin developers:
    
      - <component>_can_course_category_delete($category)
      - <component>_can_course_category_delete_move($category, $newcategory)
    These hooks allow plugin developers greater control over category deletion. Plugin can return false in those
    functions if category deletion or deletion with content move to the new parent category is not permitted.
    
      - <component>_pre_course_category_delete_move($category, $newcategory)
    This hook is expanding functionality of existing <component>_pre_course_category_delete hook and allow plugin developers
    to execute code prior to category deletion when its content is moved to another category.
    
     - <component>_get_course_category_contents($category)
    This hook allow plugin developers to add information that is displayed on category deletion form. Function should
    return string, which will be added to the list of category contents shown on the form.
    72316a9f