def _export_field_content(xblock_item, item_dir):
 module_data = xblock_item.get_explicitly_set_fields_by_scope(Scope.content)
 if isinstance(module_data, dict):
  for field_name in module_data:
   if (field_name not in DEFAULT_CONTENT_FIELDS):
    with item_dir.open('{0}.{1}.{2}'.format(xblock_item.location.name, field_name, 'json'), 'w') as field_content_file:
     field_content_file.write(dumps(module_data.get(field_name, {}), cls=EdxJSONEncoder, sort_keys=True, indent=4))

def _export_field_content ( xblock_item , item_dir ) : module_data = xblock_item . get_explicitly_set_fields_by_scope ( Scope . content ) if isinstance ( module_data , dict ) : for field_name in module_data : if ( field_name not in DEFAULT_CONTENT_FIELDS ) : with item_dir . open ( '{0}.{1}.{2}' . format ( xblock_item . location . name , field_name , 'json' ) , 'w' ) as field_content_file : field_content_file . write ( dumps ( module_data . get ( field_name , { } ) , cls = EdxJSONEncoder , sort_keys = True , indent = 4 ) )
export all fields related to xblock_item other than metadata and data to json file in provided directory .