public function get_displaytype() {
        global $CFG;

        if ($this->display == GRADE_DISPLAY_TYPE_DEFAULT) {
            return grade_get_setting($this->courseid, 'displaytype', $CFG->grade_displaytype);

        } else {
            return $this->display;
        }
    }
public function get_displaytype() {
        global $CFG;

        if ($this->display == GRADE_DISPLAY_TYPE_DEFAULT) {
            return grade_get_setting($this->courseid, 'displaytype', $CFG->grade_displaytype);

        } else {
            return $this->display;
        }
    }
public function get_displaytype ( ) { global $ CFG ; if ( $ this -> display == GRADE_DISPLAY_TYPE_DEFAULT ) { return grade_get_setting ( $ this -> courseid , 'displaytype' , $ CFG -> grade_displaytype ) ; } else { return $ this -> display ; } }
Returns the value of the display type

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

@return int Display type
Returns the value of the display type