add function in contoller and unit-tests for coursem and course