0160: move course management functions to courseplay.courses class