function _DegreePlan::__construct
Search API
4.x _DegreePlan.php | _DegreePlan::__construct($degree_id = "", DatabaseHandler $db = NULL, $bool_load_minimal = false, $array_significant_courses = false, $bool_use_draft = false) |
5.x _DegreePlan.php | _DegreePlan::__construct($degree_id = "", DatabaseHandler $db = NULL, $bool_load_minimal = FALSE, $array_significant_courses = FALSE, $bool_use_draft = FALSE) |
File
- classes/
_DegreePlan.php, line 54
Class
Code
function __construct($degree_id = "", DatabaseHandler $db = NULL, $bool_load_minimal = FALSE, $array_significant_courses = FALSE, $bool_use_draft = FALSE) {
$this->list_semesters = new ObjList();
$this->list_groups = new GroupList();
$this->bool_use_draft = $bool_use_draft;
// Always override if the global variable is set.
if (@$GLOBALS ["fp_advising"]["bool_use_draft"] == true) {
$this->bool_use_draft = true;
}
$this->required_course_id_array = array();
$this->public_notes_array = array();
$this->extra_data_array = array();
$this->db_advising_weight = 0;
$this->track_selection_config_array = array();
$this->db = $db;
if ($db == NULL)
{
$this->db = get_global_database_handler();
}
$this->student_array_significant_courses = $array_significant_courses;
if ($degree_id != "")
{
$this->degree_id = $degree_id;
$this->load_descriptive_data();
if (!$bool_load_minimal)
{
$this->load_degree_plan();
}
// Add the "Add a Course" semester to the semester list.
$this->add_semester_courses_added();
}
if ($this->degree_level == "") {
$this->degree_level = "UG"; // undergrad by default
}
}