A former primary school teacher is facing 20 historical sexual assault charges for offences alleged to have taken place during classes, sporting trips and sleepovers at children's homes.