function _SubstitutionList::find_group_additions
Search API
4.x _SubstitutionList.php | _SubstitutionList::find_group_additions(Group $group) |
5.x _SubstitutionList.php | _SubstitutionList::find_group_additions(Group $group) |
File
- classes/
_SubstitutionList.php, line 42
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->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;
}
}