function _Course::get_first_value_from_any_degree
Search API
5.x _Course.php | _Course::get_first_value_from_any_degree($key) |
Goes through the details_by_degree array and returns the first valid value for the supplied key, any degree., or return NULL if not found.
1 call to _Course::get_first_value_from_any_degree()
- _Course::get_hours_awarded in classes/
_Course.php - If the boolean is set, it means if the supplied degree_id isn't set, then use the first found value.
File
- classes/
_Course.php, line 382
Class
Code
function get_first_value_from_any_degree($key) {
foreach ($this->details_by_degree_array as $d => $v) {
if (isset($v [$key])) {
return $v [$key];
}
}
// Found nothing, return null
return NULL;
}