You are here

function computing_status_readable in Drupal Computing 7.2

Get the readable name for Computing Record status.

3 calls to computing_status_readable()
computing_command_form in ./computing.admin.inc
This is similar to system_settings_form(). Make all data in 'input', and add "Add" button and other generic fields.
views_handler_field_computing_status::render in ./computing.views.inc
Render the field.
views_handler_filter_computing_status::get_value_options in ./computing.views.inc
Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.

File

./computing.module, line 522

Code

function computing_status_readable($acronym = NULL) {
  $table = array(
    'RDY' => t('Ready'),
    // newly created record to be processed.
    'SCF' => t('Successful'),
    // processed successful
    'FLD' => t('Failed'),
    // for some reason processing is not successful

    //'DON' => t('Done'),         // process done. does not indicate whether it's successful or not.
    'ABD' => t('Aborted'),
    // the application didn't generate error, but computing is aborted for other reasons such as timeout.
    'RUN' => t('Running'),
  );
  if ($acronym === NULL) {
    return $table;
  }
  else {
    return array_key_exists($acronym, $table) ? $table[$acronym] : FALSE;
  }
}