function accessibility_tests_list_submit

cis7 accessibility.admin.inc accessibility_tests_list_submit($form, &$form_state)
cle7 accessibility.admin.inc accessibility_tests_list_submit($form, &$form_state)
elmsmedia7 accessibility.admin.inc accessibility_tests_list_submit($form, &$form_state)
icor7 accessibility.admin.inc accessibility_tests_list_submit($form, &$form_state)
meedjum_blog7 accessibility.admin.inc accessibility_tests_list_submit($form, &$form_state)
mooc7 accessibility.admin.inc accessibility_tests_list_submit($form, &$form_state)

Form submit callback for importing tests.

File

sites/all/modules/ulmus/accessibility/accessibility.admin.inc, line 123

Code

function accessibility_tests_list_submit($form, &$form_state) {
  if ($form_state['clicked_button']['#value'] == t('Filter')) {
    $_SESSION['accessibility_tests_filter'] = array(
      'guideline' => $form_state['values']['guideline'],
      'category' => $form_state['values']['category'],
      'severity' => $form_state['values']['severity'],
    );
    return;
  }
  if ($form_state['clicked_button']['#value'] == t('Reset')) {
    $_SESSION['accessibility_tests_filter'] = array();
    return;
  }
  $tests = module_invoke_all('accessibility_tests', TRUE);
  $enabled_tests = _accessibility_admin_get_enabled_tests();
  $batch = array(
    'operations' => array(),
    'finished' => 'accessibility_tests_list_done',
    'title' => t('Importing tests'),
    'init_message' => t('Starting to import tests.'),
    'progress_message' => t('Imported @current out of @total.'),
    'error_message' => t('An error occurred while importing tests.'),
    'file' => drupal_get_path('module', 'accessibility') . '/accessibility.admin.inc',
  );
  foreach ($form_state['values']['tests'] as $test => $enabled) {
    if ($enabled && !isset($enabled_tests[$test])) {
      $batch['operations'][] = array('_accessibility_create_test_from_quail', array($test, $tests[$test]));
    }
  }

  batch_set($batch);
}