function _Course::get_advised_hours

4.x _Course.php _Course::get_advised_hours()
5.x _Course.php _Course::get_advised_hours()

Returns how many hours this course has been advised for. This is used with courses which have variable hours. If the course has not been advised for any particular number of hours, then it's min_hours are returned.

Return value

unknown

File

classes/_Course.php, line 914

Class

_Course

Code

function get_advised_hours() 
 {
  if ($this->advised_hours > -1) 
   {
    return $this->advised_hours * 1;
  }
  else {
    // No, the user has not selected any hours yet.  So,
    // just display the min_hours.

    // Correct for ghost hours, if any.
    $min_h = $this->min_hours * 1;
    if ($this->bool_ghost_min_hour) {
      $min_h = 0;
    }

    return $min_h;
  }

}