function user_student_list_filter_form_submit

7.x user.student.inc user_student_list_filter_form_submit($form, $form_state)
6.x user.student.inc user_student_list_filter_form_submit($form, $form_state)

File

modules/user/user.student.inc, line 454
Keep track of functions dealing specifically with student user management

Code

function user_student_list_filter_form_submit($form, $form_state) {
  $values = $form_state ['values'];

  unset($_SESSION ['users_filter_name']);
  unset($_SESSION ['users_filter_school']);
  unset($_SESSION ['users_filter_major']);
  unset($_SESSION ['users_filter_active']);
  unset($_SESSION ['users_filter_submit']);

  if ($values ['submit_btn'] != '') {
    $_SESSION ['users_filter_name'] = fp_trim(@$values ['filter_name']);
    $_SESSION ['users_filter_school'] = fp_trim(@$values ['filter_school']);
    $_SESSION ['users_filter_major'] = fp_trim(@$values ['filter_major']);
    $_SESSION ['users_filter_active'] = fp_trim(@$values ['filter_active']);

    $_SESSION ['users_filter_submit'] = "yes"; // simply notes that we did indeed press the submit btn.

    // If "active" was the only one changed, then we do not set this users_filter_submit
    if (fp_trim(@$values ['filter_name']) == "" && intval(@$values ['filter_school']) === 0 && fp_trim(@$values ['filter_major']) == "") {
      unset($_SESSION ['users_filter_submit']);
    }


  }


  fp_goto("admin/users/students", "de_catalog_year=" . $values ['de_catalog_year']);

}