How would one know that he is a student if he couldn't produce a student ID? Just by saying so?
I am not saying the cops should have not arrested him. I am not even saying they should not have shocked him ONCE to control him.
But cops only get to arrest, NOT PUNISH. They should have arrested and removed him, if he had done something to deserve arrest. Instead they took it upon their chicken selves to keep shocking someone who did not appear to be a threat at all to anyone.
And the bigger point is that peace officers have a larger duty to keep the peace. It is not their job to start a riot in a library.