_DegreePlan::get_major_code_csv

5.x _DegreePlan.php _DegreePlan::get_major_code_csv()

Returns back a CSV of all the major codes that this degree comprises

File

classes/_DegreePlan.php, line 777

Class

_DegreePlan

Code

function get_major_code_csv() {
  if (!$this->is_combined_dynamic_degree_plan) {
    return $this->major_code; // just a basic single non-combined degree.
  }

  // Otherwise, we should assume this is a combined dynamic degree.
  $rtn = "";

  foreach ($this->combined_degree_ids_array as $degree_id) {
    $t_degree_plan = new DegreePlan($degree_id);
    $rtn .= $t_degree_plan->major_code . ",";
  }

  $rtn = rtrim($rtn, ","); // remove last comma, if its there.

  return $rtn;

}