public function get_active_method() {
        global $DB;

        $this->ensure_isset(array('context', 'component', 'area'));

        // get the current grading area record if it exists
        if (is_null($this->areacache)) {
            $this->areacache = $DB->get_record('grading_areas', array(
                'contextid' => $this->context->id,
                'component' => $this->component,
                'areaname'  => $this->area),
            '*', IGNORE_MISSING);
        }

        if ($this->areacache === false) {
            // no area record yet
            return null;
        }

        return $this->areacache->activemethod;
    }
public function get_active_method() {
        global $DB;

        $this->ensure_isset(array('context', 'component', 'area'));

        // get the current grading area record if it exists
        if (is_null($this->areacache)) {
            $this->areacache = $DB->get_record('grading_areas', array(
                'contextid' => $this->context->id,
                'component' => $this->component,
                'areaname'  => $this->area),
            '*', IGNORE_MISSING);
        }

        if ($this->areacache === false) {
            // no area record yet
            return null;
        }

        return $this->areacache->activemethod;
    }
public function get_active_method ( ) { global $ DB ; $ this -> ensure_isset ( array ( 'context' , 'component' , 'area' ) ) ; // get the current grading area record if it exists if ( is_null ( $ this -> areacache ) ) { $ this -> areacache = $ DB -> get_record ( 'grading_areas' , array ( 'contextid' => $ this -> context -> id , 'component' => $ this -> component , 'areaname' => $ this -> area ) , '*' , IGNORE_MISSING ) ; } if ( $ this -> areacache === false ) { // no area record yet return null ; } return $ this -> areacache -> activemethod ; }
Returns the currently active grading method in the gradable area

@return string|null the name of the grading plugin of null if it has not been set
Returns the currently active grading method in the gradable area