A secondary school teacher asked a Muslim pupil if she had a bomb under her hijab, a disciplinary tribunal heard.