function course_certificate_course_outline_completion_links_alter in Course 7
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()
- 6 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()
- 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(
t('Download certificate'),
"node/{$node->nid}/certificate",
t('Download a PDF of your certificate.'),
);
}
}