Brussels had threatened legal action over the law branded an attack on academic freedom.