Move get_viewable_courses method to ApplicationController