function _Course::equals

4.x _Course.php _Course::equals(Course $course_c = null)
5.x _Course.php _Course::equals(Course $course_c = null)

Convienience function. Simply compare the course_id of another course to $this to see if they are equal.

This is also used by CourseList and ObjList to determine matches.

Usage: if ($newCourse.equals($otherCourse)) { ... }

Parameters

Course $course_c:

Return value

bool

1 call to _Course::equals()
_Course::equals_placeholder in classes/_Course.php
Basically, this is a comparator function that will return true if $this equals many of the attributes of $course_c. Useful for seeing if $this is an "instance of" a particular course, but not necessairily the course that the student took. …

File

classes/_Course.php, line 1270

Class

_Course

Code

function equals(Course $course_c = null) 
 {
  if ($course_c != null && $this->course_id == $course_c->course_id) 
   {
    return true;
  }

  return false;
}