function _CourseList::has_any_course_selected

4.x _CourseList.php _CourseList::has_any_course_selected()
5.x _CourseList.php _CourseList::has_any_course_selected()

Returns TRUE if there is at least one course in this list which is selected (for advising).

Return value

bool

File

classes/_CourseList.php, line 1087

Class

_CourseList

Code

function has_any_course_selected() 
 {
  /*
		Returns TRUE if there is at least one course
		in this list which is "selected."  FALSE, otherwise.
		*/
  $temp_i = $this->i; // preserve the counter.
  $this->reset_counter();
  $rtn = false;
  while ($this->has_more()) 
   {
    $c = $this->get_next();
    if ($c->bool_selected == true) 
     {
      $rtn = true;
      break;
    }
  }

  $this->i = $temp_i;
  return $rtn;
}