function course_search_menu

6.x course_search.module course_search_menu()
4.x course_search.module course_search_menu()
5.x course_search.module course_search_menu()

File

modules/course_search/course_search.module, line 10
This module allows users to search for courses, descriptions, and, if supported, rotation schedules and sample syllabi.

Code

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

  $items ["tools/course-search"] = array(
    "title" => "Course Search",
    "description" => "Use this tool to view course descriptions, sample syllabi, and projected course offering schedules.",
    "page_callback" => "course_search_display_search",
    "access_callback" => TRUE,
    "page_settings" => array(
      "page_has_search" => FALSE,
      "page_banner_is_link" => TRUE,
      "page_hide_report_error" => TRUE,
      "target" => "_blank",
      "menu_icon" => fp_theme_location() . "/images/book_glass_20.jpg",
    ),
    "type" => MENU_TYPE_NORMAL_ITEM,
  );


  $items ["course-search/get-syllabus"] = array(
    "title" => "Course Search",
    "page_callback" => "course_search_download_syllabus",
    "access_callback" => TRUE,
    "type" => MENU_TYPE_CALLBACK,
  );



  $items ["admin/config/course-search"] = array(
    "title" => "Course Search Settings",
    "description" => "Administer the Course Search module's settings",
    "page_callback" => "fp_render_form",
    "page_arguments" => array("course_search_settings_form", "system_settings"),
    "access_arguments" => array("administer_course_search"),
    "page_settings" => array(
      "page_has_search" => FALSE,
      "page_banner_is_link" => TRUE,
      "page_hide_report_error" => TRUE,
      "menu_icon" => fp_theme_location() . "/images/book_glass_20.jpg",
      "menu_links" => array(
        0 => array(
          "text" => "Back to main menu",
          "path" => "admin-tools/admin",
          "query" => "de_catalog_year=%DE_CATALOG_YEAR%",
        ),
      ),
    ),
    "type" => MENU_TYPE_NORMAL_ITEM,
  );

  $items ["tools/course-search/courses"] = array(
    "title" => "Course Search",
    "page_callback" => "course_search_display_courses",
    "access_callback" => TRUE,
    "page_settings" => array(
      "page_has_search" => FALSE,
      "page_banner_is_link" => TRUE,
      "page_hide_report_error" => TRUE,
    ),
    "type" => MENU_TYPE_CALLBACK,
  );


  $items ["tools/course-search/edit-list"] = array(
    "title" => "Update Course Information",
    "page_callback" => "course_search_display_edit_courses",
    "access_arguments" => array("can_update_course_info_details"),
    "page_settings" => array(
      "page_has_search" => FALSE,
      "menu_links" => array(
        0 => array(
          "text" => "Back to Course Search",
          "path" => "tools/course-search",
        ),
      ),
    ),
    "file" => menu_get_module_path("course_search") . "/course_search.edit.inc",
    "type" => MENU_TYPE_CALLBACK,
  );


  $items ["tools/course-search/edit-info-details"] = array(
    "title" => "Edit Course Info Details",
    "page_callback" => "fp_render_form",
    "page_arguments" => array("course_search_edit_course_details_form"),
    "access_arguments" => array("can_update_course_info_details"),
    "page_settings" => array(
      "page_has_search" => FALSE,
      "page_banner_is_link" => TRUE,
      "menu_links" => array(
        0 => array(
          "text" => "Back to Course Search",
          "path" => "tools/course-search",
        ),
        1 => array(
          "text" => "Back to Course Edit List",
          "path" => "tools/course-search/edit-list",
        ),
      ),
    ),
    "file" => menu_get_module_path("course_search") . "/course_search.edit.inc",
    "type" => MENU_TYPE_CALLBACK,
  );

  $items ["tools/course-search/view-reports"] = array(
    "title" => "View Reports",
    "page_callback" => "course_search_display_view_reports",
    "access_arguments" => array("can_update_course_info_details"),
    "page_settings" => array(
      "page_has_search" => FALSE,
      "menu_links" => array(
        0 => array(
          "text" => "Back to Course Search",
          "path" => "tools/course-search",
        ),
        1 => array(
          "text" => "Back to Course Edit List",
          "path" => "tools/course-search/edit-list",
        ),
      ),
    ),
    "file" => menu_get_module_path("course_search") . "/course_search.edit.inc",
    "type" => MENU_TYPE_CALLBACK,
  );

  // Simple callback to download CSV
  $items ["tools/course-search/get-offering-csv"] = array(
    "page_callback" => "course_search_get_offering_csv",
    "access_arguments" => array("can_update_course_info_details"),
    "file" => menu_get_module_path("course_search") . "/course_search.edit.inc",
    "type" => MENU_TYPE_CALLBACK,
  );


  return $items;
}