function Course::get_advised_hours

6.x Course.php Course::get_advised_hours()
7.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 924

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;
  }

}