function _CourseList::find_first_unfulfilled_match
Search API
4.x _CourseList.php | _CourseList::find_first_unfulfilled_match(Course $course_c) |
5.x _CourseList.php | _CourseList::find_first_unfulfilled_match(Course $course_c) |
Returns a match to the Course courseC which does not have any courses fulfilling it. Usefull for finding course requirement matches in a list which have not yet been assigned.
Parameters
Course $course_c:
Return value
File
- classes/
_CourseList.php, line 235
Class
Code
function find_first_unfulfilled_match(Course $course_c)
{
// Returns match to courseC which does not have
// any courses fulfilling it. Useful for finding
// course requirement matches in a list which have not
// yet been assigned.
for ($t = 0; $t < $this->count; $t++)
{
if ($this->array_list [$t]->equals($course_c) && $this->array_list [$t]->course_list_fulfilled_by->is_empty == true)
{
return $this->array_list [$t];
}
}
return false;
}