Teacher refused to let daughter go to the toilet