You are here

function quiz_categorized_form in Quiz 6.4

Same name and namespace in other branches
  1. 8.4 quiz.admin.inc \quiz_categorized_form()
  2. 7.6 quiz.admin.inc \quiz_categorized_form()
  3. 7 quiz.admin.inc \quiz_categorized_form()
  4. 7.4 quiz.admin.inc \quiz_categorized_form()
  5. 7.5 quiz.admin.inc \quiz_categorized_form()

Form for managing what questions should be added to a quiz with categorized random questions.

Parameters

array $form_state: The form state array

object $quiz: The quiz node

1 string reference to 'quiz_categorized_form'
quiz_questions in ./quiz.admin.inc
Creates a form for quiz questions.

File

./quiz.admin.inc, line 517
Administrator interface for Quiz module.

Code

function quiz_categorized_form($form_state, $quiz) {
  $form = array();
  _quiz_categorized_existing_terms_form($form, $form_state, $quiz);
  _quiz_categorized_new_term_form($form, $form_state, $quiz);
  $form['nid'] = array(
    '#type' => 'value',
    '#value' => $quiz->nid,
  );
  $form['vid'] = array(
    '#type' => 'value',
    '#value' => $quiz->vid,
  );
  $form['tid'] = array(
    '#type' => 'value',
    '#value' => NULL,
  );

  // Give the user the option to create a new revision of the quiz
  _quiz_add_revision_checkbox($form, $quiz);

  // Timestamp is needed to avoid multiple users editing the same quiz at the same time.
  $form['timestamp'] = array(
    '#type' => 'hidden',
    '#default_value' => time(),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  $form['#tree'] = TRUE;
  return $form;
}