function quiz_menu in Quiz 6.2
Same name and namespace in other branches
- 8.6 quiz.module \quiz_menu()
- 8.4 quiz.module \quiz_menu()
- 8.5 quiz.module \quiz_menu()
- 5.2 quiz.module \quiz_menu()
- 5 quiz.module \quiz_menu()
- 6.6 quiz.module \quiz_menu()
- 6.3 quiz.module \quiz_menu()
- 6.4 quiz.module \quiz_menu()
- 6.5 quiz.module \quiz_menu()
- 7.6 quiz.module \quiz_menu()
- 7 quiz.module \quiz_menu()
- 7.4 quiz.module \quiz_menu()
- 7.5 quiz.module \quiz_menu()
- 6.x quiz.module \quiz_menu()
Implementation of hook_menu().
File
- ./
quiz.module, line 129 - Quiz Module
Code
function quiz_menu() {
// ADMIN //
$items['admin/settings/quiz'] = array(
'title' => t('@quiz configuration', array(
'@quiz' => QUIZ_NAME,
)),
'description' => t('Configure @quiz options.', array(
'@quiz' => QUIZ_NAME,
)),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'quiz_admin_settings',
),
'access arguments' => array(
QUIZ_PERM_ADMIN_CONFIG,
),
'type' => MENU_NORMAL_ITEM,
// optional
'file' => 'quiz.admin.inc',
);
$items['admin/quiz/results'] = array(
'title' => t('@quiz results', array(
'@quiz' => QUIZ_NAME,
)),
'page callback' => 'quiz_admin',
'access arguments' => array(
'administer quiz',
),
'type' => MENU_NORMAL_ITEM,
'file' => 'quiz.admin.inc',
);
$items['admin/quiz/%/view'] = array(
'title' => t('View @quiz', array(
'@quiz' => QUIZ_NAME,
)),
'page callback' => 'quiz_admin_results',
'page arguments' => array(
2,
),
'access arguments' => array(
'administer quiz',
),
'type' => MENU_CALLBACK,
'file' => 'quiz.admin.inc',
);
$items['admin/quiz/%/delete'] = array(
'title' => t('Delete @quiz', array(
'@quiz' => QUIZ_NAME,
)),
'page callback' => 'quiz_admin_result_delete',
//'page arguments' => array(2),
'access arguments' => array(
'administer quiz',
),
'type' => MENU_CALLBACK,
'file' => 'quiz.admin.inc',
);
// Menu item for adding questions to quiz.
$items['node/%quiz_type_access/questions'] = array(
'title' => t('Manage questions'),
'page callback' => 'quiz_questions',
'page arguments' => array(
1,
),
'access arguments' => array(
'create quiz',
),
'type' => MENU_LOCAL_TASK,
'file' => 'quiz.admin.inc',
);
$items['node/%quiz_type_access/admin'] = array(
'title' => t('Quiz admin', array(
'@quiz' => QUIZ_NAME,
)),
'page callback' => 'theme',
'page arguments' => array(
'quiz_view',
1,
),
'access arguments' => array(
'administer quiz',
),
'type' => MENU_LOCAL_TASK,
'file' => 'quiz.admin.inc',
);
// USER //
$items['user/%/myresults'] = array(
'title' => t('My results'),
'page callback' => 'quiz_get_user_results',
'page arguments' => array(
1,
),
'access arguments' => array(
'own results',
),
'type' => MENU_LOCAL_TASK,
'file' => 'quiz.pages.inc',
);
$items['user/quiz/%/userresults'] = array(
'title' => t('User results'),
'page callback' => 'quiz_user_results',
'page arguments' => array(
2,
),
'access arguments' => array(
'own results',
),
'type' => MENU_CALLBACK,
'file' => 'quiz.pages.inc',
);
return $items;
}