'Updates the given block\'s xBlock fields data with the xBlock
value for the given field name.
Arguments:
block_data (BlockData) - A BlockStructure BlockData
object.
xblock (XBlock) - An instantiated XBlock object whose
field is being accessed and collected for later
retrieval.
field_name (string) - The name of the xBlock field that is
being collected and stored.'

def _set_xblock_field(self, block_data, xblock, field_name):

    if hasattr(xblock, field_name):
        setattr(block_data, field_name, getattr(xblock, field_name))
