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 ["stats"] = array(
    "title" => "Analytics & Reports",
    "page_callback" => "stats_display_main",
    "access_arguments" => array("can_access_stats"),
    "page_settings" => array(
      "page_show_title" => TRUE,
    ),
    "type" => MENU_TYPE_NORMAL_ITEM,
  );


  $items ["stats/select-school"] = array(
    "title" => "Select School",
    "page_callback" => "fp_render_form",
    "page_arguments" => array("stats_select_school_form"),
    "access_arguments" => array("can_access_stats"),
    "page_settings" => array(
      "page_show_title" => TRUE,
      "bool_print" => FALSE,
      "menu_links" => array(
        0 => array(
          "text" => t("Analytics"),
          "path" => "stats",
        ),
      ),
    ),
    "type" => MENU_TYPE_CALLBACK,
  );



  $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,
      "menu_links" => array(
        0 => array(
          "text" => t("Analytics"),
          "path" => "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,
      "menu_links" => array(
        0 => array(
          "text" => t("Analytics"),
          "path" => "stats",
        ),
      ),
    ),
    "type" => MENU_TYPE_NORMAL_ITEM,
    "weight" => 150,
  );




  $items ["stats/reports/major-students-progress"] = array(
    "title" => "Major Students Progress",
    "description" => "Students in a major, and their progress percentages in that major.",
    "page_callback" => "fp_render_form",
    "page_arguments" => array("stats_report_major_students_progress_form"),
    "access_arguments" => array("can_access_stats"),
    "page_settings" => array(
      "bool_print" => FALSE,
      "menu_links" => array(
        0 => array(
          "text" => t("Analytics"),
          "path" => "stats",
        ),
      ),
    ),
    "type" => MENU_TYPE_NORMAL_ITEM,
    "weight" => 170,
    "file" => menu_get_module_path("stats") . "/reports.major-students-progress.inc",
  );







  $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" => t("Analytics"),
          "path" => "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,
      "menu_links" => array(
        0 => array(
          "text" => t("Analytics"),
          "path" => "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,
      "menu_links" => array(
        0 => array(
          "text" => t("Analytics"),
          "path" => "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,
      "menu_links" => array(
        0 => array(
          "text" => t("Analytics"),
          "path" => "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;
}