You are here

function certificate_sets_checks_form_submit in Certificate 6

File

./certificate.admin.inc, line 164
Administrative pages for the module.

Code

function certificate_sets_checks_form_submit($form, $form_state) {
  $write = $form_state['values'];
  $write['check_key'] = serialize($write['check_key']);
  if (drupal_write_record('certificate_criteria', $write)) {
    drupal_set_message('Criteria added.');
  }
  else {
    drupal_set_message('Criteria failed.');
  }
  drupal_goto('admin/settings/certificate/sets/' . $form_state['values']['type_id'] . '/criteria');
}