Pupil resilience in the classroom