You are here

function course_content_form_node_type_form_alter in Course 7.2

Same name and namespace in other branches
  1. 8.3 modules/course_content/course_content.module \course_content_form_node_type_form_alter()
  2. 8.2 modules/course_content/course_content.module \course_content_form_node_type_form_alter()
  3. 6 modules/course_content/course_content.module \course_content_form_node_type_form_alter()
  4. 7 modules/course_content/course_content.module \course_content_form_node_type_form_alter()
  5. 3.x modules/course_content/course_content.module \course_content_form_node_type_form_alter()

Implements hook_form_FORM_ID_alter().

File

modules/course_content/course_content.module, line 42

Code

function course_content_form_node_type_form_alter(&$form, &$form_state) {

  // Alter the node type's configuration form to add our setting.
  $form['course']['course_content_use'] = array(
    '#title' => t('Use as course content'),
    '#type' => 'checkbox',
    '#default_value' => variable_get("course_content_use_{$form['#node_type']->type}", 0),
    '#description' => t('Use this content type as course content, where fulfillment is satisifed on view.') . '<br/><br/>' . t('<strong>Warning:</strong> Do not set this for interactive content (e.g. Quiz) unless you want to fulfill the requirement immediately when this content is viewed. Instead, use the course integration provided by the object module (e.g. course_quiz).'),
  );
}