Manchester teacher had schoolboy's baby, court hears