Teacher who groomed children online before sexually abusing them is jailed