A federal judge blocked the White House from cutting hundreds of millions in teacher training funds after eight states sued.