You are here

function course_certificate_course_outline_completion_links_alter in Course 6

Same name and namespace in other branches
  1. 8.3 modules/course_certificate/course_certificate.module \course_certificate_course_outline_completion_links_alter()
  2. 8.2 modules/course_certificate/course_certificate.module \course_certificate_course_outline_completion_links_alter()
  3. 7.2 modules/course_certificate/course_certificate.module \course_certificate_course_outline_completion_links_alter()
  4. 7 modules/course_certificate/course_certificate.module \course_certificate_course_outline_completion_links_alter()
  5. 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.',
    );
  }
}