def get_override_for_user(user, block, name, default=None):
 if (not hasattr(block, '_student_overrides')):
  block._student_overrides = {}
 overrides = block._student_overrides.get(user.id)
 if (overrides is None):
  overrides = _get_overrides_for_user(user, block)
  block._student_overrides[user.id] = overrides
 return overrides.get(name, default)

def get_override_for_user ( user , block , name , default = None ) : if ( not hasattr ( block , '_student_overrides' ) ) : block . _student_overrides = { } overrides = block . _student_overrides . get ( user . id ) if ( overrides is None ) : overrides = _get_overrides_for_user ( user , block ) block . _student_overrides [ user . id ] = overrides return overrides . get ( name , default )
gets the value of the overridden field for the user .