You are here

quiz_by_taker.view.inc in Quiz 7

File

includes/views/defaults/quiz_by_taker.view.inc
View source
<?php

$view = new view();
$view->name = 'quiz_by_taker';
$view->description = 'View of all the quizzes a user has taken';
$view->tag = 'quiz';
$view->view_php = '';
$view->base_table = 'quiz_node_properties';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE;

/* Edit this to true to make a default view disabled initially */
$handler = $view
  ->new_display('default', 'Defaults', 'default');
$handler
  ->override_option('relationships', array(
  'vid' => array(
    'label' => 'quiz revision',
    'required' => 1,
    'id' => 'vid',
    'table' => 'quiz_node_results',
    'field' => 'vid',
    'relationship' => 'none',
  ),
));
$handler
  ->override_option('fields', array(
  'title' => array(
    'label' => 'Title',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node_revision',
    'field' => 'title',
    'relationship' => 'vid',
  ),
  'name' => array(
    'label' => 'Name',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_user' => 1,
    'overwrite_anonymous' => 0,
    'anonymous_text' => '',
    'exclude' => 0,
    'id' => 'name',
    'table' => 'users',
    'field' => 'name',
    'relationship' => 'vid',
  ),
  'score' => array(
    'label' => 'Score',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'exclude' => 0,
    'id' => 'score',
    'table' => 'quiz_node_results',
    'field' => 'score',
    'relationship' => 'none',
  ),
  'time_start' => array(
    'label' => 'Quiz Start Time.',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'date_format' => 'small',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'time_start',
    'table' => 'quiz_node_results',
    'field' => 'time_start',
    'relationship' => 'none',
  ),
  'time_end' => array(
    'label' => 'Quiz End Time',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'date_format' => 'small',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'time_end',
    'table' => 'quiz_node_results',
    'field' => 'time_end',
    'relationship' => 'none',
  ),
  'quiz_state' => array(
    'label' => 'Quiz State',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'exclude' => 0,
    'id' => 'quiz_state',
    'table' => 'quiz_node_results',
    'field' => 'quiz_state',
    'relationship' => 'none',
  ),
));
$handler
  ->override_option('arguments', array(
  'uid' => array(
    'default_action' => 'not found',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => 'Quizzes taken by %1',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'not' => 0,
    'allow_null' => 1,
    'id' => 'uid',
    'table' => 'quiz_node_results',
    'field' => 'uid',
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'multichoice' => 0,
      'quiz' => 0,
      'long_answer' => 0,
      'true_false' => 0,
      'page' => 0,
      'story' => 0,
      'wanky_group' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 0,
      '2' => 0,
      '3' => 0,
    ),
    'validate_argument_type' => 'tid',
    'user_argument_type' => '',
    'restrict_user_roles' => 0,
    'user_roles' => array(),
    'validate_argument_php' => '',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
    ),
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_is_member' => 0,
  ),
));
$handler
  ->override_option('filters', array(
  'nid' => array(
    'operator' => '=',
    'value' => '',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'which_vid' => 'latest',
    'secondary' => 'results',
    'id' => 'nid',
    'table' => 'quiz_node_properties',
    'field' => 'nid',
    'relationship' => 'none',
    'secondary_group_by' => 'uid',
    'secondary_group_by_table' => 'quiz_node_results',
    'secondary_table' => 'quiz_node_results',
    'secondaries' => array(
      'secondary_group_by' => 'uid',
      'secondary_table' => 'quiz_node_results',
      'secondary_vid' => 'vid',
      'secondary_nid' => 'nid',
    ),
  ),
));
$handler
  ->override_option('access', array(
  'type' => 'none',
));
$handler
  ->override_option('style_plugin', 'table');
$handler
  ->override_option('style_options', array(
  'grouping' => 'vid',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'time_end' => 'time_end',
    'nid' => 'nid',
    'vid' => 'vid',
    'time_start' => 'time_start',
    'score' => 'score',
    'uid' => 'uid',
  ),
  'info' => array(
    'time_end' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'nid' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'vid' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'time_start' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'score' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'uid' => array(
      'sortable' => 0,
      'separator' => '',
    ),
  ),
  'default' => '-1',
));
$handler = $view
  ->new_display('page', 'Page', 'page_1');
$handler
  ->override_option('path', 'quiztest/bytaker/%');
$handler
  ->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler
  ->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
));