function _Student::get_major_and_track_code
Search API
4.x _Student.php | _Student::get_major_and_track_code($bool_ignore_settings = false) |
5.x _Student.php | _Student::get_major_and_track_code($bool_ignore_settings = false) |
Enter description here... Returns the major code and trackCode, if it exists in this form: MAJOR|CONC_TRACK Though usually it will be: MAJR|_TRCK Asumes you have already called "load_settings()";
1 call to _Student::get_major_and_track_code()
- _Student::get_degree_plan in classes/
_Student.php - Returns a student's degree plan object.
File
- classes/
_Student.php, line 566
Class
Code
function get_major_and_track_code($bool_ignore_settings = false)
{
$rtn = "";
$major_code = "";
if ($this->array_settings ["major_code"] != "")
{ // If they have settings saved, use those...
if ($this->array_settings ["track_code"] != "")
{
// if it does NOT have a | in it already....
if (!strstr($this->array_settings ["major_code"], "|"))
{
$rtn = $this->array_settings ["major_code"] . "|_" . $this->array_settings ["track_code"];
}
else {
// it DOES have a | already, so we join with just a _. This would
// be the case if we have a track AND an concentration.
$rtn = $this->array_settings ["major_code"] . "_" . $this->array_settings ["track_code"];
}
}
else {
$rtn = $this->array_settings ["major_code"];
}
$major_code = $this->array_settings ["major_code"];
}
else {
$rtn = $this->major_code;
}
if ($bool_ignore_settings == true) {
$rtn = $this->major_code;
}
return $rtn;
}