'If block is an XModuleDescriptor that has been bound to a student, return
the corresponding XModule, instead of the XModuleDescriptor.
Otherwise, return block.'

def _get_student_block(self, block):

    if (isinstance(block, XModuleDescriptor) and block.xmodule_runtime):
        return block._xmodule
    else:
        return block
