function stats_select_school_form

6.x stats.module stats_select_school_form()

File

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

Code

function stats_select_school_form() {

  $form = array();

  if (isset($_REQUEST ['title'])) {
    fp_set_title(strip_tags($_REQUEST ['title']));
  }
  $redirect_path = $_REQUEST ['redirect'];

  $options = schools_get_schools_for_fapi();
  $form ['school_id'] = array(
    'type' => 'select',
    'label' => t("Please select a school:"),
    'options' => $options,
    'hide_please_select' => TRUE,
  );
  $form ['select_school'] = array(
    'type' => 'hidden',
    'value' => 'yes',
  );

  $form ['redirect'] = array(
    'type' => 'hidden',
    'value' => base64_encode($redirect_path),
  );

  $form ['submit_btn'] = array(
    'type' => 'submit',
    'value' => t("Continue"),
  );

  // change breadcrumbs based on REQUEST
  if (isset($_REQUEST ['crumbs'])) {
    $crumbs = unserialize(base64_decode($_REQUEST ['crumbs']));

    fp_set_breadcrumbs($crumbs);
  }


  return $form;
}