You are here

function course_certificate_course_has_certificate in Course 7

Same name and namespace in other branches
  1. 6 modules/course_certificate/course_certificate.module \course_certificate_course_has_certificate()
  2. 7.2 modules/course_certificate/course_certificate.module \course_certificate_course_has_certificate()

Check if there is a Certificate on this Course.

2 calls to course_certificate_course_has_certificate()
course_certificate_access_certificate in modules/course_certificate/course_certificate.module
Implements hook_access_certificate().
course_certificate_course_outline_completion_links_alter in modules/course_certificate/course_certificate.module
Implements hook_course_outline_completion_links_alter().

File

modules/course_certificate/course_certificate.module, line 22

Code

function course_certificate_course_has_certificate($course) {
  foreach ($course
    ->getObjects() as $courseObject) {
    if ($courseObject
      ->getComponent() == 'certificate') {
      return TRUE;
    }
  }
  return FALSE;
}