function Group::set_req_by_degree_id

7.x Group.php Group::set_req_by_degree_id($degree_id = 0)
6.x Group.php Group::set_req_by_degree_id($degree_id = 0)

Set all the courses and branches in this group to the specified degree_id.

File

classes/Group.php, line 490

Class

Group

Code

function set_req_by_degree_id($degree_id = 0) {
  $this->req_by_degree_id = $degree_id;
  $this->list_courses->reset_counter();
  $this->list_courses->set_req_by_degree_id($degree_id);

  // go through sub-groups and do the same...
  $this->list_groups->reset_counter();
  while ($this->list_groups->has_more()) 
   {
    $g = $this->list_groups->get_next();
    $g->set_req_by_degree_id($degree_id);
  }

}