public function qualifies_for_regrading() {
        if (empty($this->id)) {
            debugging("Can not regrade non existing category");
            return false;
        }

        $db_item = grade_category::fetch(array('id'=>$this->id));

        $aggregationdiff = $db_item->aggregation         != $this->aggregation;
        $keephighdiff    = $db_item->keephigh            != $this->keephigh;
        $droplowdiff     = $db_item->droplow             != $this->droplow;
        $aggonlygrddiff  = $db_item->aggregateonlygraded != $this->aggregateonlygraded;
        $aggoutcomesdiff = $db_item->aggregateoutcomes   != $this->aggregateoutcomes;

        return ($aggregationdiff || $keephighdiff || $droplowdiff || $aggonlygrddiff || $aggoutcomesdiff);
    }
public function qualifies_for_regrading() {
        if (empty($this->id)) {
            debugging("Can not regrade non existing category");
            return false;
        }

        $db_item = grade_category::fetch(array('id'=>$this->id));

        $aggregationdiff = $db_item->aggregation         != $this->aggregation;
        $keephighdiff    = $db_item->keephigh            != $this->keephigh;
        $droplowdiff     = $db_item->droplow             != $this->droplow;
        $aggonlygrddiff  = $db_item->aggregateonlygraded != $this->aggregateonlygraded;
        $aggoutcomesdiff = $db_item->aggregateoutcomes   != $this->aggregateoutcomes;

        return ($aggregationdiff || $keephighdiff || $droplowdiff || $aggonlygrddiff || $aggoutcomesdiff);
    }
public function qualifies_for_regrading ( ) { if ( empty ( $ this -> id ) ) { debugging ( "Can not regrade non existing category" ) ; return false ; } $ db_item = grade_category :: fetch ( array ( 'id' => $ this -> id ) ) ; $ aggregationdiff = $ db_item -> aggregation != $ this -> aggregation ; $ keephighdiff = $ db_item -> keephigh != $ this -> keephigh ; $ droplowdiff = $ db_item -> droplow != $ this -> droplow ; $ aggonlygrddiff = $ db_item -> aggregateonlygraded != $ this -> aggregateonlygraded ; $ aggoutcomesdiff = $ db_item -> aggregateoutcomes != $ this -> aggregateoutcomes ; return ( $ aggregationdiff || $ keephighdiff || $ droplowdiff || $ aggonlygrddiff || $ aggoutcomesdiff ) ; }
Compares the values held by this object with those of the matching record in DB, and returns
whether or not these differences are sufficient to justify an update of all parent objects.
This assumes that this object has an ID number and a matching record in DB. If not, it will return false.

@return bool
Compares the values held by this object with those of the matching record in DB and returns whether or not these differences are sufficient to justify an update of all parent objects . This assumes that this object has an ID number and a matching record in DB . If not it will return false .