Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Binary file added htdocs/images/mni_icon.ico
Binary file not shown.
Binary file added htdocs/images/mni_logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added htdocs/images/mni_logo_transparent.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 18 additions & 1 deletion php/libraries/Utility.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -460,5 +460,22 @@ class Utility extends PEAR
return false;
}

function getAllInstruments() {
$DB =& Database::singleton();
$DB->select("SELECT Test_name FROM test_names", &$instruments_q);

// This array_map call turns the result of the above query to
// a non-associative array, so that we can use the array_combine
// trick to get an array of the form array( 'test_name' => 'test_name')
// which can be used by quickforms for the dropdown. The array_merge
// call after that just adds an Any/All Instruments option.
function Flatten($Arr) {
return $Arr['Test_name'];
}
$in = array_map('Flatten', $instruments_q);
$instruments = array_combine($in, $in);
return $instruments;

}
}
?>
?>