Student accused of taking gun to school