function _CourseList::count_fulfilled_or_advised
Search API
4.x _CourseList.php | _CourseList::count_fulfilled_or_advised() |
5.x _CourseList.php | _CourseList::count_fulfilled_or_advised() |
Returns the number of courses in this list which have either been fulfilled or advised to take. It does not count hours, just the courses themselves.
Return value
int
File
- classes/
_CourseList.php, line 1987
Class
Code
function count_fulfilled_or_advised()
{
// This function returns the number of courses in this
// courseList which is either fulfilled or has been advised
// to take. It does care about hours, just the number of
// courses themselves.
$count = 0;
for ($t = 0; $t < $this->count; $t++)
{
$course = $this->array_list [$t];
if ($course->bool_advised_to_take == true)
{
$count++;
}
// Several ways to tell if a course is here by credit...
if (!$course->course_list_fulfilled_by->is_empty)
{
$count++;
}
else if ($course->grade != "") {
$count++;
}
else if ($course->bool_substitution == true)
{
$count++;
}
}
return $count;
}