function stats_menu

7.x stats.module stats_menu()
6.x stats.module stats_menu()
4.x stats.module stats_menu()
5.x stats.module stats_menu()

Implementation of hook_menu

Return value

unknown

File

modules/stats/stats.module, line 18
This module displays statistics and reports for FlightPath

Code

function stats_menu() {
  $items = array();

  $items ["admin-tools/stats"] = array(
    "title" => "Usage Stats & Reports",
    "page_callback" => "stats_display_main",
    "access_arguments" => array("can_access_stats"),
    "page_settings" => array(
      "page_show_title" => TRUE,
      "menu_icon" => fp_theme_location() . "/images/popup.gif",
      "target" => "_blank",
    ),
    "type" => MENU_TYPE_NORMAL_ITEM,
  );


  $items ["stats/reports/access"] = array(
    "title" => "Access Stats",
    "description" => "See recent access within the system.  This can be useful to see if anyone is currently using the system.",
    "page_callback" => "stats_report_access_stats",
    "access_arguments" => array("can_access_stats"),
    "page_settings" => array(
      "page_show_title" => TRUE,
      "bool_print" => FALSE,
      "menu_links" => array(
        0 => array(
          "text" => "Main menu",
          "path" => "admin-tools/stats",
        ),
      ),
    ),
    "type" => MENU_TYPE_NORMAL_ITEM,
    "weight" => 100,
  );


  $items ["stats/reports/major-counts"] = array(
    "title" => "Major Counts",
    "description" => "Displays the number of students within each major or major/concentration.",
    "page_callback" => "stats_report_major_counts",
    "access_arguments" => array("can_access_stats"),
    "page_settings" => array(
      "page_show_title" => TRUE,
      "bool_print" => FALSE,
      "menu_links" => array(
        0 => array(
          "text" => "Main menu",
          "path" => "admin-tools/stats",
        ),
      ),
    ),
    "type" => MENU_TYPE_NORMAL_ITEM,
    "weight" => 150,
  );



  /**
   * 
   * Removing due to lack of use, and incompatibility with FP5
   * 
   * 
  $items["stats/reports/selected-degree-options"] = array(
    "title" => "Selected Degree Options",
    "description" => "This report will display information about which degree options students/advisors are selecting for particular majors 
                    (ex: General Studies)",
    "page_callback" => "stats_report_selected_degree_options",
    "access_arguments" => array("can_access_stats"),
    "page_settings" => array(
      "page_show_title" => TRUE,
      "bool_print" => FALSE,
      "menu_links" => array(         
        0 => array(
          "text" => "Main menu",
          "path" => "admin-tools/stats",
        ),
      ),            
    ),    
    "type" => MENU_TYPE_NORMAL_ITEM,
    "weight" => 200,
  );
  */





  $items ["stats/reports/advisor-use"] = array(
    "title" => "Advisor Use",
    "description" => "How many students an advisor has advised over a specified time range.",
    "page_callback" => "stats_report_advisor_use",
    "access_arguments" => array("can_access_stats"),
    "page_settings" => array(
      "page_show_title" => TRUE,
      "bool_print" => FALSE,
      "menu_links" => array(
        0 => array(
          "text" => "Main menu",
          "path" => "admin-tools/stats",
        ),
      ),
    ),
    "type" => MENU_TYPE_NORMAL_ITEM,
    "weight" => 250,
  );

  $system_name = variable_get("system_name", "FlightPath");

  $items ["stats/reports/student-course-list"] = array(
    "title" => "Student Course List",
    "description" => "List courses a student has taken, which $system_name is aware of.",
    "page_callback" => "stats_report_student_course_list",
    "access_arguments" => array("can_access_stats"),
    "page_settings" => array(
      "page_show_title" => TRUE,
      "bool_print" => FALSE,
      "menu_links" => array(
        0 => array(
          "text" => "Main menu",
          "path" => "admin-tools/stats",
        ),
      ),
    ),
    "type" => MENU_TYPE_NORMAL_ITEM,
    "weight" => 300,
  );




  $items ["stats/reports/flightpath-use-summary"] = array(
    "title" => "$system_name Use Summary",
    "description" => "A detailed report on how $system_name is being used over a specified time range.",
    "page_callback" => "stats_report_flightpath_use_summary",
    "access_arguments" => array("can_access_stats"),
    "page_settings" => array(
      "page_show_title" => TRUE,
      "bool_print" => FALSE,
      "menu_links" => array(
        0 => array(
          "text" => "Main menu",
          "path" => "admin-tools/stats",
        ),
      ),
    ),
    "type" => MENU_TYPE_NORMAL_ITEM,
    "weight" => 350,
  );





  $items ["stats/reports/course-use-summary"] = array(
    "title" => "Course Use Summary",
    "description" => "A report of everywhere a particular course is used in $system_name (groups or degrees).",
    "page_callback" => "stats_report_course_use_summary",
    "access_arguments" => array("can_access_stats"),
    "page_settings" => array(
      "page_show_title" => TRUE,
      "bool_print" => FALSE,
      "menu_links" => array(
        0 => array(
          "text" => "Main menu",
          "path" => "admin-tools/stats",
        ),
      ),
    ),
    "type" => MENU_TYPE_NORMAL_ITEM,
    "weight" => 450,
  );





  // Lets the user download a CSV file stored in the batch_queue table, with a batch_id.
  $items ["stats/download-csv-from-batch/%"] = array(
    "page_callback" => "stats_download_csv_from_batch",
    "page_arguments" => array(2),
    "access_arguments" => array("can_access_stats"),
    "type" => MENU_TYPE_CALLBACK,
  );





  return $items;
}