'Pray to Allah or get detention, pupils are told'