You are here

function certificate_warn_course_content in Certificate 7.3

Same name and namespace in other branches
  1. 8.3 certificate.module \certificate_warn_course_content()
  2. 7.2 certificate.module \certificate_warn_course_content()
  3. 3.x certificate.module \certificate_warn_course_content()

Modify the node type form to add a warning about using a Certificate node as a course content object.

1 string reference to 'certificate_warn_course_content'
certificate_form_alter in ./certificate.module
Implements hook_form_alter().

File

./certificate.module, line 272
Certificate module.

Code

function certificate_warn_course_content(&$form, &$form_state) {
  if (module_exists('course_content')) {
    $form['course']['course_content_use']['#description'] = '<span class="error">This is probably not what you want! Do not use a Certificate as a course content object.<br/>Use the "Course certificate" module which provides a "Certificate" course object.</span>';
  }
  return $form;
}