Self-reported chocolate intake? There are so many possible confounders here. It seens quite implausible that chocolate can acutely enhance cognitive ability. Alternative explanations are more likely, although not newsworthy. I also think that nutrition science, which is deficient enough as it is, should not be mixed with epidemiology, which seems designed to detect spurious associations.
Other research:
https://scholar.google.com/scholar?q=cocoa+flavanols+cogniti...