‘It is a crucial year in your education,’ judge tells first child to receive custodial sentence for last month’s violence