function blank_degrees_select_degree_form_submit

7.x blank_degrees.module blank_degrees_select_degree_form_submit($form, $form_state)
6.x blank_degrees.module blank_degrees_select_degree_form_submit($form, $form_state)
4.x blank_degrees.module blank_degrees_select_degree_form_submit($form, $form_state)
5.x blank_degrees.module blank_degrees_select_degree_form_submit($form, $form_state)

Submit handler for degree selection

File

modules/blank_degrees/blank_degrees.module, line 473

Code

function blank_degrees_select_degree_form_submit($form, $form_state) {


  // Are we first selecting a school?
  if (isset($form_state ['POST']['from_select_school']) && $form_state ['POST']['from_select_school'] == 'yes') {
    fp_goto('tools/blank-degrees', 'school_id=' . intval($form_state ['POST']['school_id']));
    return;
  }



  $school_id = intval($form_state ['values']['school_id']);

  // If all the user did was select catalog year, we need to redirect
  // back to the form with blank_catalog_year set.
  if ($form_state ["values"]["blank_degree_id"] == "" && $form_state ["values"]["blank_catalog_year"] != "") {
    // Go to degree selection.
    fp_goto("tools/blank-degrees", "blank_catalog_year=" . $form_state ["values"]["blank_catalog_year"] . "&school_id=$school_id");
    return;
  }
  else if ($form_state ["values"]["blank_degree_id"] != "" && $form_state ["values"]["blank_catalog_year"] != "") {
    // Send them to the blank degree page

    fp_goto("blank-degrees/display", "blank_degree_id=" . $form_state ["values"]["blank_degree_id"] . "&blank_catalog_year=" . $form_state ["values"]["blank_catalog_year"] . "&school_id=$school_id");
    return;
  }

}