function Course::equals

6.x Course.php Course::equals(Course $course_c = null)
7.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 1265

Class

Course

Code

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

  return false;
}