function CourseList::remove_unfulfilled_courses
Search API
7.x CourseList.php | CourseList::remove_unfulfilled_courses() |
6.x CourseList.php | CourseList::remove_unfulfilled_courses() |
Removes courses from this list which have not been fulfilled (ther course_list_fulfilled_by is empty).
File
- classes/
CourseList.php, line 1910
Class
Code
function remove_unfulfilled_courses()
{
// remove courses in THIS list
// which have nothing in their course_list_fulfilled_by
// object.
$rtn_list = new CourseList();
for ($t = 0; $t < $this->count; $t++)
{
$course = $this->array_list [$t];
if ($course->course_list_fulfilled_by->is_empty == false)
{
$rtn_list->add($course);
}
}
$this->array_list = $rtn_list->array_list;
$this->reset_counter();
}