Add code check to course admin controller create and edit