'Check if the subtree rooted at xblock has any drafts and thus may possibly have changes
:param xblock: xblock to check
:return: True if there are any drafts anywhere in the subtree under xblock (a weaker
condition than for other stores)'

@memoize_in_request_cache('request_cache')
def has_changes(self, xblock):

    if getattr(xblock, 'is_draft', False):
        return True
    elif xblock.has_children:
        if (len(xblock.children) > len(xblock.get_children())):
            return True
        return any([self.has_changes(child) for child in xblock.get_children()])
    else:
        return False
