Ah, yes, it was premature. I didn't realize it was in the wrong PR. I'll
look at whether to make it work w/ either persistence layer first.


On Tue, Jul 16, 2013 at 11:06 AM, Calen Pennington <notifications@github.com
> wrote:

> In common/lib/xmodule/xmodule/x_module.py:
>
> > +        json_data:
> > +        - 'category': the xmodule category (required)
> > +        - 'metadata': a dict of locally set metadata (not inherited)
> > +        - 'children': a list of children's usage_ids w/in this course
> > +        - 'definition':
> > +        - '_id' (optional): the usage_id of this. Will generate one if not given one.
> > +        """
> > +        usage_id = json_data.get('_id', None)
> > +        if not '_inherited_metadata' in json_data and parent_xblock is not None:
> > +            json_data['_inherited_metadata'] = parent_xblock.xblock_kvs.get_inherited_metadata().copy()
> > +            json_metadata = json_data.get('metadata', {})
> > +            for field in inheritance.INHERITABLE_METADATA:
> > +                if field in json_metadata:
> > +                    json_data['_inherited_metadata'][field] = json_metadata[field]
> > +
> > +        new_block = system.xblock_from_json(cls, usage_id, json_data)
>
> If this change isn't needed before next-gen-modulestore, let's just move
> it there, rather having unused broken code in this PR
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/270/files#r5217901>
> .
>