You are here

function quiz_stats_get_adv_stats in Quiz 7

Same name and namespace in other branches
  1. 8.6 modules/quiz_stats/quiz_stats.admin.inc \quiz_stats_get_adv_stats()
  2. 8.4 modules/quiz_stats/quiz_stats.admin.inc \quiz_stats_get_adv_stats()
  3. 8.5 modules/quiz_stats/quiz_stats.admin.inc \quiz_stats_get_adv_stats()
  4. 6.4 includes/quiz_stats/quiz_stats.admin.inc \quiz_stats_get_adv_stats()
  5. 7.6 modules/quiz_stats/quiz_stats.admin.inc \quiz_stats_get_adv_stats()
  6. 7.4 includes/quiz_stats/quiz_stats.admin.inc \quiz_stats_get_adv_stats()
  7. 7.5 modules/quiz_stats/quiz_stats.admin.inc \quiz_stats_get_adv_stats()
  8. 6.x modules/quiz_stats/quiz_stats.admin.inc \quiz_stats_get_adv_stats()

Get stats for a single quiz. Maybe also for a single user.

Parameters

$vid: quiz revision id

$uid: User id

Return value

HTML page with charts/graphs

1 string reference to 'quiz_stats_get_adv_stats'
quiz_stats_menu in includes/quiz_stats/quiz_stats.module
Implements hook_menu().

File

includes/quiz_stats/quiz_stats.admin.inc, line 71
Administration file for Quiz stats Module

Code

function quiz_stats_get_adv_stats($vid, $uid = 0) {
  $charts = array();
  drupal_add_css(drupal_get_path('module', 'quiz_stats') . '/quiz_stats.css', array(
    'type' => 'file',
    'weight' => CSS_THEME,
  ));
  $charts['takeup'] = _get_date_vs_takeup_count_chart($vid, $uid);

  // line chart/graph showing quiz takeup date along x-axis and count along y-axis
  $charts['status'] = _get_quiz_status_chart($vid, $uid);

  // 3D pie chart showing percentage of pass, fail, incomplete quiz status
  $charts['top_scorers'] = _get_quiz_top_scorers_chart($vid, $uid);

  // Bar chart displaying top scorers
  $charts['grade_range'] = _get_quiz_grade_range_chart($vid, $uid);
  return theme('quiz_stats_charts', array(
    'charts' => $charts,
  ));
}