You are here

function quiz_question_menu in Quiz 6.6

Same name and namespace in other branches
  1. 8.6 question_types/quiz_question/quiz_question.module \quiz_question_menu()
  2. 8.4 question_types/quiz_question/quiz_question.module \quiz_question_menu()
  3. 8.5 question_types/quiz_question/quiz_question.module \quiz_question_menu()
  4. 6.3 question_types/quiz_question/quiz_question.module \quiz_question_menu()
  5. 6.4 question_types/quiz_question/quiz_question.module \quiz_question_menu()
  6. 6.5 question_types/quiz_question/quiz_question.module \quiz_question_menu()
  7. 7.6 question_types/quiz_question/quiz_question.module \quiz_question_menu()
  8. 7 question_types/quiz_question/quiz_question.module \quiz_question_menu()
  9. 7.4 question_types/quiz_question/quiz_question.module \quiz_question_menu()
  10. 7.5 question_types/quiz_question/quiz_question.module \quiz_question_menu()

Implementation of hook_menu().

File

question_types/quiz_question/quiz_question.module, line 35
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_menu() {

  // Menu item for seeing references to a question.
  $items['node/%quiz_question_type_access/references'] = array(
    'title' => t('References'),
    'page callback' => 'quiz_question_references',
    'page arguments' => array(
      1,
    ),
    // FIXME give this a sensible callback
    'access callback' => TRUE,
    'type' => MENU_LOCAL_TASK,
    'file' => 'quiz_question.pages.inc',
  );

  // Menu items for admin view of each question type.
  $types = _quiz_question_get_implementations();
  foreach ($types as $type => $definition) {
    $items['admin/quiz/' . str_replace('_', '-', $type)] = array(
      'title' => t('@name administration', array(
        '@name' => $definition['name'],
      )),
      'description' => t('Configure the @name question type.', array(
        '@name' => $definition['name'],
      )),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'quiz_question_type_settings_form',
        $type,
      ),
      'access arguments' => array(
        'configure quiz question types',
      ),
      'type' => MENU_NORMAL_ITEM,
    );
  }
  return $items;
}