Recently I have added the Certificate module to our Moodle Site 2.3.2+ (Build: 20120927). I have used tips from this forum to modify my certificate, text, design etc, and works great! Instead of having the date on the certificate I would like to have an expiry date. So if the certificate was issued today the expiry date would be 04 October 2013.
Now when looking through this forum someone has posted this code, which I added to certificate/type/my certificate/certificate.php:
$expdate = str_replace(' 0', ' ', strftime('%B %d, %Y',(strtotime("+2 years", $certdate))));
cert_printtext(285, 480, 'C', 'Arial', '', 16, utf8_decode("Expiration Date: ".$expdate));
That did not work so I changed the code to this:
$expdate = str_replace(' 0', ' ', strftime('%B %d, %Y',(strtotime("+1 years", $prereq_date))));
certificate_print_text($pdf, $x, $y, + 98, 'Helvetica', '', 16, utf8_decode("Expiration Date: ".$expdate));
The expiry date now shows on the certificate but as ‘Expiration Date: January 1, 1971’. I am not a programmer but I have experience with HTML/CSS.
Any ideas?
Thanks
John