'Returns whether this xblock is draft, public, or private.
Returns:
PublishState.draft - content is in the process of being edited, but still has a previous
version deployed to LMS
PublishState.public - content is locked and deployed to LMS
PublishState.private - content is editable and not deployed to LMS'

def has_published_version(self, xblock):

    course_id = xblock.scope_ids.usage_id.course_key
    store = self._get_modulestore_for_courselike(course_id)
    return store.has_published_version(xblock)
