function _CourseList::get_advised_courses_list

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

Returns a CourseList of courses which have bool_advised_to_take == true.

Return value

CourseList

File

classes/_CourseList.php, line 2024

Class

_CourseList

Code

function get_advised_courses_list() 
 {
  // Return a courseList object of courses in THIS
  // list which have bool_advised_to_take == true.
  $rtn_list = new CourseList();
  for ($t = 0; $t < $this->count; $t++) 
   {
    $course = $this->array_list [$t];
    if ($course->bool_advised_to_take == true) 
     {
      $rtn_list->add($course);
    }
  }

  return $rtn_list;

}