You are here

function quiz_question_form_node_form_alter in Quiz 7.4

Same name and namespace in other branches
  1. 8.4 question_types/quiz_question/quiz_question.module \quiz_question_form_node_form_alter()
  2. 7.5 question_types/quiz_question/quiz_question.module \quiz_question_form_node_form_alter()

Implements hook_form().

File

question_types/quiz_question/quiz_question.module, line 120
Quiz Question module. This module provides the basic facilities for adding quiz question types to a quiz.

Code

function quiz_question_form_node_form_alter(&$form, &$form_state) {
  $type = $form['#node']->type;
  if (array_key_exists($type, _quiz_question_get_implementations())) {
    $question = _quiz_question_get_instance($form['#node']);
    $quiz_question_form = $question
      ->getNodeForm($form_state);
    $form = array_merge($quiz_question_form, $form);
  }
}