def override_field_for_user(user, block, name, value):
 (override, _) = StudentFieldOverride.objects.get_or_create(course_id=block.runtime.course_id, location=block.location, student_id=user.id, field=name)
 field = block.fields[name]
 override.value = json.dumps(field.to_json(value))
 override.save()

def override_field_for_user ( user , block , name , value ) : ( override , _ ) = StudentFieldOverride . objects . get_or_create ( course_id = block . runtime . course_id , location = block . location , student_id = user . id , field = name ) field = block . fields [ name ] override . value = json . dumps ( field . to_json ( value ) ) override . save ( )
overrides a field for the user .