function _Group::__construct

4.x _Group.php _Group::__construct($group_id = "", DatabaseHandler $db = NULL, $semester_num = -1, $array_significant_courses = false, $bool_use_draft = false)
5.x _Group.php _Group::__construct($group_id = "", DatabaseHandler $db = NULL, $semester_num = -1, $array_significant_courses = false, $bool_use_draft = false, $requirement_type = "")

File

classes/_Group.php, line 42

Class

_Group

Code

function __construct($group_id = "", DatabaseHandler $db = NULL, $semester_num = -1, $array_significant_courses = false, $bool_use_draft = false) 
 {
  $this->group_id = $group_id;
  $this->assigned_to_semester_num = $semester_num;
  $this->count_of_matches = 0;
  $this->hours_assigned = 0;
  $this->list_courses = new CourseList();
  $this->list_groups = new GroupList();
  $this->bool_use_draft = $bool_use_draft;
  $this->hours_required_by_type = array();
  // Always override if the global variable is set.
  if ($GLOBALS ["fp_advising"]["bool_use_draft"] == true) {
    $this->bool_use_draft = true;
  }


  $this->db = $db;
  if ($db == NULL) 
   {
    $this->db = get_global_database_handler();
  }


  if ($group_id != "") 
   {
    $this->bool_placeholder = false;
    $this->load_group(true, $array_significant_courses);
  }

}