Add edit function to course frontend controller