function course_certificate_course_outline_completion_links_alter in Course 6
Same name and namespace in other branches
- 8.3 modules/course_certificate/course_certificate.module \course_certificate_course_outline_completion_links_alter()
- 8.2 modules/course_certificate/course_certificate.module \course_certificate_course_outline_completion_links_alter()
- 7.2 modules/course_certificate/course_certificate.module \course_certificate_course_outline_completion_links_alter()
- 7 modules/course_certificate/course_certificate.module \course_certificate_course_outline_completion_links_alter()
- 3.x modules/course_certificate/course_certificate.module \course_certificate_course_outline_completion_links_alter()
Implements hook_course_outline_completion_links_alter().
Add a download certificate link.
File
- modules/
course_certificate/ course_certificate.module, line 8
Code
function course_certificate_course_outline_completion_links_alter(&$links, $node, $account) {
$course = course_get_course($node);
if (course_certificate_course_has_certificate($course)) {
$links['certificate'] = array(
'Download certificate',
"node/{$node->nid}/certificate",
'Download a PDF of your certificate.',
);
}
}