Higher homotopy operations and cohomology