Bummer, I already put it on the production system. I assume a script like you describe could be initiated through my nightly cron so the d/b is reset each night?
(Anyone out there have such a script...again, my weakness is that I am not a developer.)
The capability to reissue certificates when a course has been retaken appears to have a lot of user interest. I certainly will testify to how important that option is. This module is so integral to Moodle I have a hard time understanding why it has not become part of the core release and get some full-time support.
To borrow a phrase... C'est la vie!