static public function CourseList::cast

6.x CourseList.php static public CourseList::cast(ObjList $obj)

Used to cast a regular ObjList object into a CourseList.

Parameters

ObjList $obj:

Return value

CourseList

5 calls to CourseList::cast()
AdvisingScreen::mark_course_as_displayed in classes/AdvisingScreen.php
Find all instaces of a Course in a Group and mark as displayed.
CourseList::find_all_matches in classes/CourseList.php
Using the parent's function of find_all_matches, this will return a CourseList of all courses which match the Course object.
CourseList::find_best_grade_match in classes/CourseList.php
Find a list of matches to Course courseC, which fulfill the min_grade requirement, ordered by most best grade first.
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.
CourseList::mark_repeats_exclude in classes/CourseList.php
Go through the list and set the $bool_exclude_repeat flag to TRUE for all matches of $course in this list.

File

classes/CourseList.php, line 21

Class

CourseList

Code

static public function cast(ObjList $obj) 
 { // This can be used to cast a regular ObjList
  // into a CourseList object.
  // Use the syntax:  CourseList::cast($x);
  $new_c_l = new CourseList();
  $new_c_l->array_list = $obj->array_list;
  $new_c_l->is_empty = $obj->is_empty;
  $new_c_l->reset_counter();



  return $new_c_l;

}