function _Course::get_first_assigned_to_group_id
Search API
5.x _Course.php | _Course::get_first_assigned_to_group_id() |
Return the first element in our assigned_to_group_ids_array, or FALSE
File
- classes/
_Course.php, line 2089
Class
Code
function get_first_assigned_to_group_id() {
if (count($this->assigned_to_group_ids_array) < 1) {
return FALSE;
}
// Otherwise, get it.
$x = reset($this->assigned_to_group_ids_array); // returns the first element.
if ($x == 0) { // not a valid group_id number
return FALSE;
}
// Otherwise, return x
return $x;
}