involves a small change to remove_course_contents function in moodlelib.php which calls function in questionlib.