function CourseList::contains_group_requirement_id

7.x CourseList.php CourseList::contains_group_requirement_id($id)
6.x CourseList.php CourseList::contains_group_requirement_id($id)

Returns TRUE if this list has a course which contains $id for it's db_group_requirement_id property.

Parameters

int $id:

  • This is the id to test for.

Return value

bool

File

classes/CourseList.php, line 1525

Class

CourseList

Code

function contains_group_requirement_id($id) 
 {
  // Returns true if the list has a course
  // which contains $id for it's db_group_requirement_id.
  // False if it cannot be found.
  for ($t = 0; $t < $this->count; $t++) 
   {
    $course = $this->array_list [$t];
    if ($course->db_group_requirement_id == $id) 
     {
      return true;
    }
  }

  return false;

}