Delete course and function about pre_remove