'Reverts an item to its last published version (recursively traversing all of its descendants).
If no published version exists, an InvalidVersionError is thrown.
If a published version exists but there is no draft version of this item or any of its descendants, this
method is a no-op.
:raises InvalidVersionError: if no published version exists for the location specified'

def revert_to_published(self, location, user_id):

    store = self._verify_modulestore_support(location.course_key, 'revert_to_published')
    return store.revert_to_published(location, user_id)
