delete functions in courses and lectures model