The student was sleeping while the teacher was teaching.
phraseUncommon#11,083
teacher or doctor (honorific title, as the subject)先生 is used after a person’s name as a respectful title for teachers, doctors, and similar professionals; が marks the person as the subject.
JA: ジョーンズ先生が病気なので、今日はブラウン先生が彼の代わりに教えます。
EN: Since Dr. Jones is sick, Dr. Brown will teach in his place today.