def _get_overrides_for_user(user, block):
 query = StudentFieldOverride.objects.filter(course_id=block.runtime.course_id, location=block.location, student_id=user.id)
 overrides = {}
 for override in query:
  field = block.fields[override.field]
  value = field.from_json(json.loads(override.value))
  overrides[override.field] = value
 return overrides

def _get_overrides_for_user ( user , block ) : query = StudentFieldOverride . objects . filter ( course_id = block . runtime . course_id , location = block . location , student_id = user . id ) overrides = { } for override in query : field = block . fields [ override . field ] value = field . from_json ( json . loads ( override . value ) ) overrides [ override . field ] = value return overrides
gets all of the individual student overrides for given user and block .