function _Group::set_requirement_type

5.x _Group.php _Group::set_requirement_type($requirement_type = "")

Sets the requirement type for the group and all its courses (including sub-groups)

1 call to _Group::set_requirement_type()

File

classes/_Group.php, line 509

Class

_Group

Code

function set_requirement_type($requirement_type = "") {
  $this->requirement_type = $requirement_type;
  $this->list_courses->reset_counter();
  $this->list_courses->set_requirement_type($requirement_type);

  // 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_requirement_type($requirement_type);
  }
}