original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: Returns the currently active grading method in the gradable area