Split get_courses_for_wiki impl

LMS-2914
yeah this has become katamari code. Thanks for pointing it out