function Group::__construct

6.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 47

Class

Group

Code

function __construct($group_id = "", DatabaseHandler $db = NULL, $semester_num = -1, $array_significant_courses = false, $bool_use_draft = false, $requirement_type = "") 
 {
  $this->group_id = $group_id;
  $this->assigned_to_semester_num = $semester_num;
  $this->count_of_matches = 0;
  $this->hours_assigned = 0;
  $this->min_hours_allowed = 0;
  $this->school_id = 0;
  $this->list_courses = new CourseList();
  $this->list_groups = new GroupList();
  $this->bool_use_draft = $bool_use_draft;
  $this->hours_required_by_type = array();
  $this->requirement_type = $requirement_type;
  // 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 || !is_object($db) || !is_resource($db->dbc)) {
    $this->db = get_global_database_handler();
  }


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

}