fix links to edit courses in courses list
fix error messages in new course page
encapsule code from altert popup