a mi también me ha pasado, es un error del idioma, que es incompatible la carpeta de español que viene con el certificado. Yo lo resolví dejando sólo la de inglés y traduciendo las partes que necesitaba (casi todo).
Además, puedes añadir más campos si quieres. Yo he puesto número de expediente y fechas de inicio y fin. Te dejo el código:
- en lang/en/certificate.php
$string['emailteachermail'] = '
{$a->student} ha recibido el \'{$a->certificate}\' del curso {$a->course} con NÚMERO DE EXPEDIENTE {$a->code} y realizado desde el {$a->startdate} hasta el {$a->enddate}';
function certificate_email_others ($course, $certificate, $certrecord, $cm) {
global $USER, $CFG, $DB;
if ($certificate->emailothers) {
$student = $certrecord->studentname;
$others = explode(',', $certificate->emailothers);
if ($others) {
$strawarded = get_string('awarded', 'certificate');
foreach ($others as $other) {
$other = trim($other);
if (validate_email($other)) {
$destination = new stdClass;
$destination->email = $other;
$info = new stdClass;
$info->student = $student;
$info->course = format_string($course->fullname,true);
$info->certificate = format_string($certificate->name,true);
$info->code = format_string($course->idnumber,true);
$info->startdate = format_string(date('d/m/Y', $course->startdate),true);
$info->enddate = format_string(date('d/m/Y', $course->enddate),true);
$info->url = $CFG->wwwroot.'/mod/certificate/report.php?id='.$cm->id;
$from = $student;
$postsubject = $strawarded.': '.$info->student.' -> '.$certificate->name;
$posttext = certificate_email_teachers_text($info);
$posthtml = certificate_email_teachers_html($info);
@email_to_user($destination, $from, $postsubject, $posttext, $posthtml); // If it fails, oh well, too bad.
}
}
}
}
}
Tú deberías que usar las variables que hayas utilizado.
Ahora estoy viendo cómo hacer para que se envíe el correo sin tener que escribir la dirección, que lo haga automáticamente. Si alguien tiene alguna idea aquí la espero.
Saludos.