Hello,
I have translated the whole certificate language file to French, the whole calendar language file to French and am still getting the following message as an introduction to the certificate and getting the date in English on the certificate:
Vous avez reçu votre certificat le:
Sunday, 27 July 2008, 08:00
Since it's a certificate for learning French, I can't really have the date in English
I have researched on the forums any clue as to answers to this problem and I haven't found anything that related to my specific problem.
Chardelle, would you know any answer to that problem?
Thank you!
Bruno
Hi Bruno,
Thanks for the report!!
Printing dates in the user's language doesn't rely on the certificate lang files, it is a global Moodle function. I was missing that in the code. While I'm at it I am going to fix up a few other things, so it will be awhile until it is fixed in cvs.
If you need the fix now, you can replace the code for this function in your certificate/lib.php file.
/************************************************************************
* Returns user information about issued certificates -- used for index and review.*
************************************************************************/
function certificate_get_issue($course, $user) {
global $USER, $certificate;
if (record_exists("certificate_issues", "certificateid", $certificate->id, "userid", $user->id)) {
$issue = get_record("certificate_issues", "certificateid", $certificate->id, "userid", $user->id);
}
return get_record("certificate_issues", "certificateid", $certificate->id, "userid", $user->id);
}
Thanks for the report!!
Printing dates in the user's language doesn't rely on the certificate lang files, it is a global Moodle function. I was missing that in the code. While I'm at it I am going to fix up a few other things, so it will be awhile until it is fixed in cvs.
If you need the fix now, you can replace the code for this function in your certificate/lib.php file.
/************************************************************************
* Returns user information about issued certificates -- used for index and review.*
************************************************************************/
function certificate_get_issue($course, $user) {
global $USER, $certificate;
if (record_exists("certificate_issues", "certificateid", $certificate->id, "userid", $user->id)) {
$issue = get_record("certificate_issues", "certificateid", $certificate->id, "userid", $user->id);
}
return get_record("certificate_issues", "certificateid", $certificate->id, "userid", $user->id);
}
See: http://moodle.org/mod/forum/discuss.php?d=110713 for a related problem (and possible solution).