Why are you replacing this function instead of adding a new one? I think this function has useful use as-is on the Instructor tab - to just link to the course in cms.