Chocolate is bad for dogs - in fact, veterinarians consider it poison. Chocolate contains theobromine, a central nervous system stimulant that may cause seizures, excessive urination (leading to dehydration), and heart damage.
The half-life of theobromine is approximately 17.5 hours. If your dogs ate the cookie several weeks ago, they have entirely eliminated the toxin from their bodies by now and should be fine. Be careful not to let them have more, though. Dogs can develop a craving for chocolate, just like humans.
The darker the chocolate, the more theobromine it contains. Milk chocolate is less toxic than dark chocolate, which is less toxic than baker's chocolate.
Symptoms of chocolate toxicity include vomiting, diarrhea, hyperactivity, twitching, and seizing. This is considered a veterinary emergency requiring prompt, supportive care.
While sharing chocolate with your dog may seem fun and harmless in small quantities, the practice is best avoided. A better choice is to keep a small supply of treats on hand that are nutritionally formulated for dogs.