'Returns true if CCX has been enabled and the specified user is a coach'

@classmethod
def is_enabled(cls, course, user=None):

    if ((not settings.FEATURES.get('CUSTOM_COURSES_EDX', False)) or (not course.enable_ccx)):
        return False
    is_staff_or_instructor = (has_access(user, 'staff', course) or has_access(user, 'instructor', course))
    if (hasattr(course.id, 'ccx') and is_staff_or_instructor):
        return True
    role = CourseCcxCoachRole(course.id)
    return role.has_user(user)
