You are here

function opigno_quiz_app_menu in Opigno Quiz App 7

Implements hook_menu().

File

./opigno_quiz_app.module, line 15
Module file. Defines module hooks.

Code

function opigno_quiz_app_menu() {
  return array(
    'user/%/achievements' => array(
      'title' => "My achievements",
      'page callback' => 'opigno_quiz_app_user_results',
      'page arguments' => array(
        1,
      ),
      'access callback' => 'opigno_quiz_app_access_user_achievements',
      'access arguments' => array(
        1,
      ),
      'file' => 'includes/opigno_quiz_app.pages.inc',
      'type' => MENU_LOCAL_TASK,
    ),
    'my-achievements' => array(
      'title' => "My achievements",
      'page callback' => 'opigno_quiz_app_user_results',
      'access arguments' => array(
        'access own results',
      ),
      'file' => 'includes/opigno_quiz_app.pages.inc',
      'type' => MENU_CALLBACK,
    ),
    'my-results' => array(
      'title' => "My results",
      'page callback' => 'opigno_quiz_app_current_user_results',
      'access callback' => 'user_is_logged_in',
      'file' => 'includes/opigno_quiz_app.pages.inc',
      'type' => MENU_CALLBACK,
    ),
    'node/%node/teacher-results' => array(
      'title' => "Student results",
      'description' => "Displays all student results to teachers",
      'page callback' => 'opigno_quiz_app_course_results',
      'page arguments' => array(
        1,
      ),
      'access callback' => 'opigno_quiz_app_access_node_teacher_results',
      'access arguments' => array(
        1,
        NULL,
      ),
      'file' => 'includes/opigno_quiz_app.pages.inc',
      'type' => MENU_CALLBACK,
    ),
    'node/%node/sort-quizzes' => array(
      'title' => "Sort @quiz_name_plural",
      'title arguments' => array(
        '@quiz_name_plural' => defined('QUIZ_NAME_PLURAL') ? QUIZ_NAME_PLURAL : 'quizzes',
      ),
      'description' => "Sort quizzes inside the course",
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'opigno_quiz_app_sort_course_quizzes_form',
        1,
      ),
      'access callback' => 'opigno_quiz_app_access_node_sort_quizzes',
      'access arguments' => array(
        1,
      ),
      'file' => 'includes/opigno_quiz_app.pages.inc',
      'type' => MENU_CALLBACK,
    ),
    'admin/opigno/students/teacher-results' => array(
      'title' => "My course student results",
      'description' => "Displays all course student results to teachers",
      'page callback' => 'opigno_quiz_app_courses_results',
      'access arguments' => array(
        'access teacher results',
      ),
      'file' => 'includes/opigno_quiz_app.pages.inc',
    ),
    'node/%node/resume' => array(
      'title' => 'Resume',
      'page callback' => 'opigno_quiz_app_course_resume',
      'page arguments' => array(
        1,
      ),
      'access callback' => 'opigno_quiz_app_course_resume_access',
      'access arguments' => array(
        1,
      ),
    ),
  );
}