Removed unnecessary code in the delete and add instance functions
CONTRIB-4111 - Ensure certificate dates generated use Moodle's userdate function for consistency