function Course::get_bool_substitution

6.x Course.php Course::get_bool_substitution($degree_id = 0)
7.x Course.php Course::get_bool_substitution($degree_id = 0)

Similar to the functions regarding display, these will say if this course has been used in a substitution for a particular degree.

1 call to Course::get_bool_substitution()
Course::to_data_string in classes/Course.php
This function will create a "data string" of the course. Think of it as a poor man's serialize. I can't actually use serialize, as I have to call this for every course on the screen, and the page load time was too long when using…


classes/Course.php, line 390




function get_bool_substitution($degree_id = 0) {

  // If degree_id is zero, then use the course's currently req_by_degree_id.    
  if ($degree_id == 0) {
    $degree_id = $this->req_by_degree_id;

  if ($degree_id > 0) {
    //return $this->bool_substitution_by_degree_array[$degree_id];
    return $this->get_details_by_degree($degree_id, "bool_substitution");
  else {
    // has the course been substituted by ANY degree?      
    if ($this->get_count_details_by_degree("bool_substitution", TRUE) > 0) {
      return TRUE;

  return FALSE;