added destroy feature for connected records when a course is destroyed