Local-global principles for representations of quadratic forms