function CourseList::find_courses_with_grade

7.x CourseList.php CourseList::find_courses_with_grade($grade = 'C')
6.x CourseList.php CourseList::find_courses_with_grade($grade = 'C')

Returns a CourseList of courses with this specific grade.

File

classes/CourseList.php, line 259

Class

CourseList

Code

function find_courses_with_grade($grade = 'C') {
  $rtn = new CourseList();
  for ($t = 0; $t < $this->count; $t++) 
   {
    $course = $this->array_list [$t];
    if ($course->grade == $grade) {
      $rtn->add($course);
    }
  }

  return $rtn;
}