function _GroupList::get_advised_courses_list

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

File

classes/_GroupList.php, line 45

Class

_GroupList

Code

function get_advised_courses_list() 
 {
  // Return a courseList object of courses in THIS
  // group which have boolAdvisedToTake == true.
  $rtn_list = new CourseList();
  for ($t = 0; $t < count($this->array_list); $t++) 
   {
    $group = $this->array_list [$t];
    $rtn_list->add_list($group->list_courses->get_advised_courses_list());

    $group->list_groups->reset_counter();
    while ($group->list_groups->has_more()) 
     {
      $gg = $group->list_groups->get_next();
      $rtn_list->add_list($gg->list_courses->get_advised_courses_list());
    }
  }

  $rtn_list->remove_duplicates();

  return $rtn_list;

}