def _has_catalog_visibility(course, visibility_type):
 return (ACCESS_GRANTED if (course.catalog_visibility == visibility_type) else ACCESS_DENIED)

def _has_catalog_visibility ( course , visibility_type ) : return ( ACCESS_GRANTED if ( course . catalog_visibility == visibility_type ) else ACCESS_DENIED )
returns whether the given course has the given visibility type .