You are here

function qcollection_menu in Quiz 6.6

Implementation of qcollection_menu().

File

includes/qcollection/qcollection.module, line 83
The main file for qcollection.

Code

function qcollection_menu() {

  // Menu item for managing items in a collection
  $items['node/%qcollection_type_access/items'] = array(
    'title' => t('Manage items'),
    'page callback' => 'qcollection_items',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'node_access',
    'access arguments' => array(
      'update',
      1,
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'qcollection.inc',
  );

  // Menu item to export item list into a new quiz
  $items['node/%qcollection_type_access/export-quiz'] = array(
    'title' => t('Export as quiz'),
    'page callback' => 'qcollection_export_quiz',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'create quiz',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'qcollection.inc',
  );

  // Menu item to download item collection in a portable format
  $items['node/%qcollection_type_access/download'] = array(
    'title' => t('Download'),
    'page callback' => 'qcollection_download',
    'page arguments' => array(
      1,
    ),
    // FIXME: This needs to check to see if the user owns the qcollection.
    'access callback' => 'node_access',
    'access arguments' => array(
      'update',
      1,
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'qcollection.inc',
  );
  return $items;
}