function SubstitutionList::find_group_additions
Search API
7.x SubstitutionList.php | SubstitutionList::find_group_additions(Group $group) |
6.x SubstitutionList.php | SubstitutionList::find_group_additions(Group $group) |
File
- classes/
SubstitutionList.php, line 55
Class
Code
function find_group_additions(Group $group)
{
$group_id = $group->group_id;
$rtn_list = new CourseList();
// Find additions for this group_id and return them.
for ($t = 0; $t < count($this->array_list); $t++)
{
$substitution = $this->array_list [$t];
if ($substitution->bool_group_addition == true)
{
$c = $substitution->course_requirement;
if ($c->get_bool_assigned_to_group_id($group_id))
{
$cc = $substitution->course_list_substitutions->get_first();
//adminDebug("~~ $cc->course_id");
$rtn_list->add($cc);
}
}
}
if (!$rtn_list->is_empty)
{
return $rtn_list;
}
else {
return false;
}
}