function Student::get_major_and_track_code

6.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()";

File

classes/Student.php, line 614

Class

Student

Code

function get_major_and_track_code($bool_ignore_settings = false) 
 {

  $rtn = "";
  $major_code = "";

  if (@$this->array_settings ["major_code_csv"] != "") {
    $rtn = $this->array_settings ["major_code_csv"];
  }

  /*
    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;

}