You are here

function quiz_question_question_form in Quiz 6.3

Same name and namespace in other branches
  1. 6.6 question_types/quiz_question/quiz_question.module \quiz_question_question_form()
  2. 6.5 question_types/quiz_question/quiz_question.module \quiz_question_question_form()

Get the form to show to the user.

2 string references to 'quiz_question_question_form'
quiz_question_render_question in question_types/quiz_question/quiz_question.module
Implementation of hook_render_question().
quiz_question_view in question_types/quiz_question/quiz_question.module
Implementation of hook_view()

File

question_types/quiz_question/quiz_question.module, line 201
Quiz Question module. This module provides the basic facilities for adding quiz question types to a quiz. While you can create standard Quiz question types simply by implementing the appropriate hooks, this module provides a framework that makes…

Code

function quiz_question_question_form($context, $node) {
  $form = _quiz_question_get_instance($node)
    ->getQuestionForm($node, $context);
  $quiz = menu_get_object();

  // Get the quiz object.
  if (!empty($quiz->backwards_navigation) && !empty($node->question_number)) {
    $form['back'] = array(
      '#type' => 'submit',
      '#value' => t('Back'),
    );
  }

  // Add navigation at the bottom:
  // Submit button
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Next'),
  );

  /*
  if (empty($node->no_skip_button)) {
    $form['op']  = array(
      '#type' => 'submit',
      '#value' => t('Skip'),
    );

  }
  */
  return $form;
}