Nimisha/split converge api

Right, but it's doomed b/c it will be deleted upon the next publication
whereas that wasn't true in old mongo unless it was removed from its
parent.children


On Thu, Jul 17, 2014 at 1:51 PM, Calen Pennington <notifications@github.com>
wrote:

> In common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py:
>
> > +            return self._get_block_from_structure(course_structure, xblock.location.block_id)
> > +
> > +        if xblock.location.branch is None:
> > +            raise ValueError(u'{} is not in a branch; so, this is nonsensical'.format(xblock.location))
> > +        if xblock.location.branch == ModuleStoreEnum.BranchName.draft:
> > +            other = get_head(ModuleStoreEnum.BranchName.published)
> > +        elif xblock.location.branch == ModuleStoreEnum.BranchName.published:
> > +            other = get_head(ModuleStoreEnum.BranchName.draft)
> > +        else:
> > +            raise ValueError(u'{} is not in a branch other than draft or published; so, this is nonsensical'.format(xblock.location))
> > +
> > +        if not other:
> > +            if xblock.location.branch == ModuleStoreEnum.BranchName.draft:
> > +                return PublishState.private
> > +            else:
> > +                return PublishState.public  # a bit nonsensical
>
> I think if it exists but was deleted from the draft, then it's public
> (that's how it would be in old-mongo).
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/edx/edx-platform/pull/4381/files#r15072700>.
>