A teaching assistant has been jailed for four years after spitting at a child and pinching another pupil's nose at a school.