/** * Counts the number of classes assigned to the course * * @param int courseid Course id */ function count_course_assignments($courseid) { $assignments = pmclass::count(new field_filter('courseid', $courseid), $this->_db); return $assignments; }