City mayors and the biggest teachers’ union had expressed doubts.