`xblock_from_json` isn't defined anywhere. (Except in #271).


On Thu, Jul 11, 2013 at 3:56 PM, Christina Roberts <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)
>
> I am also still concerned about iterating through
> inheritance.INHERITABLE_METADATA. I'm not sure if that is what your comment
> refers to.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/270/files#r5150865>
> .
>