public function get_decimals() {
        global $CFG;

        if (is_null($this->decimals)) {
            return grade_get_setting($this->courseid, 'decimalpoints', $CFG->grade_decimalpoints);

        } else {
            return $this->decimals;
        }
    }
public function get_decimals() {
        global $CFG;

        if (is_null($this->decimals)) {
            return grade_get_setting($this->courseid, 'decimalpoints', $CFG->grade_decimalpoints);

        } else {
            return $this->decimals;
        }
    }
public function get_decimals ( ) { global $ CFG ; if ( is_null ( $ this -> decimals ) ) { return grade_get_setting ( $ this -> courseid , 'decimalpoints' , $ CFG -> grade_decimalpoints ) ; } else { return $ this -> decimals ; } }
Returns the value of the decimals field

It can be set at 3 levels: grade_item, course setting and site. The lowest level overrides the higher ones.

@return int Decimals (0 - 5)
Returns the value of the decimals field