function _CourseList::mark_repeats_exclude
Search API
4.x _CourseList.php | _CourseList::mark_repeats_exclude(Course $course) |
5.x _CourseList.php | _CourseList::mark_repeats_exclude(Course $course, $degree_id = 0, Course $except_for_course = NULL) |
Go through the list and set the $bool_exclude_repeat flag to TRUE for all matches of $course in this list.
Returns FALSE if no matches could be found.
Parameters
Course $course:
Return value
bool
1 call to _CourseList::mark_repeats_exclude()
- _CourseList::find_most_recent_match in classes/
_CourseList.php - Find a list of matches to Course courseC, which fulfill the min_grade requirement, ordered by most recently taken.
File
- classes/
_CourseList.php, line 242
Class
Code
function mark_repeats_exclude(Course $course)
{
// Set the bool_exclude_repeat flag to TRUE for all
// occurances of $course in THIS list.
if (!$list_matches = parent::find_all_matches($course))
{
return false;
}
$list_matches = CourseList::cast($list_matches);
$list_matches->reset_counter();
while ($list_matches->has_more())
{
$c = $list_matches->get_next();
$c->bool_exclude_repeat = true;
}
return true;
}