The impact of pupil behaviour and wellbeing on educational outcomes