2011 Drive-Thru Study: Speaker Clarity

    Auditors reported ‘clear and understandable’ speakers at nearly all of the units tested.

    Question: Was the interaction via speaker clear & understandable?

    Click the header rows to sort the data.

    'Chain', 'Total' => 'Total', 'clear_count' => 'Count', 'clear_percent' => 'Percent', 'not_clear_count' => 'Count', 'not_clear_percent' => 'Percent', ); $sort_whitelist = array( 'Chain', 'clear_percent', 'not_clear_percent' ); $header = json_decode( $header_json ); $data = json_decode( $data_json, TRUE ); $sort_field = 'Chain'; if ( isset( $_GET['sort'] ) && in_array( $_GET['sort'], $sort_whitelist ) ) { $sort_field = $_GET['sort']; } $sort_dir = 'asc'; if ( isset( $_GET['dir'] ) && in_array( $_GET['dir'], array( 'desc', 'asc' ) ) ) { $sort_dir = $_GET['dir']; } $header_row_data = array(); foreach ( $header as $field ) { $sort_indicator = ''; $dest_dir = 'asc'; if ( $sort_field == $field ) { $sort_indicator = theme_tablesort_indicator( array( 'style' => $sort_dir ) ); if ( $sort_dir == 'asc' ) { $dest_dir = 'desc'; } } if ( in_array( $field, $sort_whitelist ) ) { $header_row_data[] = array( 'data' => l( $full_headers[$field], $_GET['q'], array( 'query' => array( 'sort' => $field, 'dir' => $dest_dir), 'html' => TRUE ) ) . $sort_indicator, 'class' => 'top-header' ); } else { $header_row_data[] = array( 'data' => $full_headers[$field], 'class' => 'top-header' ); } } $table_rows = array(); $table_rows[] = array( array( 'data' => ' ', 'colspan' => 2, 'class' => 'top-header' ), array( 'data' => 'Clear and Understandable', 'colspan' => 2, 'class' => 'top-header' ), array( 'data' => 'Not Clear or Understandable', 'colspan' => 2, 'class' => 'top-header' ), ); $table_rows[] = $header_row_data; $sorted_rows = array(); $values = array(); foreach ( $data as $id => $value ) { $values[$id] = $value[$sort_field]; } if ( $sort_dir == 'asc' ) { asort( $values ); } else { arsort( $values ); } foreach ( $values as $key => $value ) { $row_cells = array(); foreach ( $header as $sort_field ) { $class = 'data'; if ( $sort_field == 'Chain' ) { $class = 'company'; } $row_cells[] = array( 'data' => $data[$key][$sort_field], 'class' => $class ); } $sorted_rows[] = $row_cells; } foreach ( $sorted_rows as $data_row ) { $table_rows[] = $data_row; } $table_rows[] = array( array('data' => 'Summary','class' => 'total-row',), array('data' => '2,002','class' => 'total-row',), array('data' => '1,897','class' => 'total-row',), array('data' => '94.8%','class' => 'total-row',), array('data' => '93','class' => 'total-row',), array('data' => '4.6%','class' => 'total-row',), ); print theme( 'table', array( 'header' => NULL, 'rows' => $table_rows, 'attributes' => array( 'id' => 'datatable' ) ) ); /* * this is a support function to sort the data based on the field & direction. * it returns an array that's used for the table row function get_2011_dt_sc_chart_sorted_rows( $data, $field, $dir, $header ) { $sorted_rows = array(); $values = array(); foreach ( $data as $id => $value ) { $values[$id] = $value[$field]; } if ( $dir == 'asc' ) { asort( $values ); } else { arsort( $values ); } foreach ( $values as $key => $value ) { $row_cells = array(); foreach ( $header as $field ) { $class = 'data'; $cell_data = $data[$key][$field]; if ( $field == 'Chain' ) { $class = 'company'; } if ( preg_match( '/percent/', $field ) ) { $cell_data .= '%'; } $row_cells[] = array( 'data' => $cell_data, 'class' => $class ); } $sorted_rows[] = $row_cells; } return $sorted_rows; }*/ ?>