5.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 400




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;