You are here

function opigno_quiz_app_filter_by_status_form in Opigno Quiz App 7

Helper form for filtering student lists by student membership state.

2 string references to 'opigno_quiz_app_filter_by_status_form'
opigno_quiz_app_courses_results in includes/opigno_quiz_app.pages.inc
Page callback: view all user results for all courses (where allowed).
opigno_quiz_app_course_results in includes/opigno_quiz_app.pages.inc
Page callback: view all user results for a specific course.

File

includes/opigno_quiz_app.pages.inc, line 195
Defines all page callbacks.

Code

function opigno_quiz_app_filter_by_status_form($form, $form_state) {
  $form['state'] = array(
    '#type' => 'select',
    '#title' => t("User state"),
    '#options' => array(
      OG_STATE_ACTIVE => t("Active"),
      OG_STATE_PENDING => t("Pending"),
      OG_STATE_BLOCKED => t("Blocked"),
    ),
    '#default_value' => isset($_SESSION['opigno_quiz_app']['state_filter'][request_path()]) ? $_SESSION['opigno_quiz_app']['state_filter'][request_path()] : OG_STATE_ACTIVE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t("Filter"),
  );
  return $form;
}