Fix edit method of course controller