You are here

function quiz_menu in Quiz 8.5

Same name and namespace in other branches
  1. 8.6 quiz.module \quiz_menu()
  2. 8.4 quiz.module \quiz_menu()
  3. 5.2 quiz.module \quiz_menu()
  4. 5 quiz.module \quiz_menu()
  5. 6.6 quiz.module \quiz_menu()
  6. 6.2 quiz.module \quiz_menu()
  7. 6.3 quiz.module \quiz_menu()
  8. 6.4 quiz.module \quiz_menu()
  9. 6.5 quiz.module \quiz_menu()
  10. 7.6 quiz.module \quiz_menu()
  11. 7 quiz.module \quiz_menu()
  12. 7.4 quiz.module \quiz_menu()
  13. 7.5 quiz.module \quiz_menu()
  14. 6.x quiz.module \quiz_menu()

Implements hook_menu().

File

./quiz.module, line 103
Contains quiz.module

Code

function quiz_menu() {
  $items['admin/quiz/reports'] = array(
    'title' => '@quiz reports and scoring',
    'title arguments' => array(
      '@quiz' => _quiz_get_quiz_name(),
    ),
    'description' => 'View reports and score answers.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array(
      'view any quiz results',
      'view results for own quiz',
    ),
    'access callback' => 'quiz_access_multi_or',
    'type' => MENU_NORMAL_ITEM,
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );
  if (Drupal::moduleHandler()
    ->moduleExists('devel_generate')) {
    $items['admin/config/development/generate/quiz'] = array(
      'title' => 'Generate quiz',
      'description' => 'Generate a given number of quizzes and questions.',
      'access arguments' => array(
        'administer quiz configuration',
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'quiz_generate_form',
      ),
      'file' => 'quiz.devel.inc',
    );
  }
  return $items;
}