def get_courses(user, org=None, filter_=None):
 courses = branding.get_visible_courses(org=org, filter_=filter_)
 permission_name = configuration_helpers.get_value('COURSE_CATALOG_VISIBILITY_PERMISSION', settings.COURSE_CATALOG_VISIBILITY_PERMISSION)
 courses = [c for c in courses if has_access(user, permission_name, c)]
 return courses

def get_courses ( user , org = None , filter_ = None ) : courses = branding . get_visible_courses ( org = org , filter_ = filter_ ) permission_name = configuration_helpers . get_value ( 'COURSE_CATALOG_VISIBILITY_PERMISSION' , settings . COURSE_CATALOG_VISIBILITY_PERMISSION ) courses = [ c for c in courses if has_access ( user , permission_name , c ) ] return courses
returns a list of courses available .