public function grading_strategy_instance() {
        global $CFG;    // because we require other libs here

        if (is_null($this->strategyinstance)) {
            $strategylib = __DIR__ . '/form/' . $this->strategy . '/lib.php';
            if (is_readable($strategylib)) {
                require_once($strategylib);
            } else {
                throw new coding_exception('the grading forms subplugin must contain library ' . $strategylib);
            }
            $classname = 'workshop_' . $this->strategy . '_strategy';
            $this->strategyinstance = new $classname($this);
            if (!in_array('workshop_strategy', class_implements($this->strategyinstance))) {
                throw new coding_exception($classname . ' does not implement workshop_strategy interface');
            }
        }
        return $this->strategyinstance;
    }
public function grading_strategy_instance() {
        global $CFG;    // because we require other libs here

        if (is_null($this->strategyinstance)) {
            $strategylib = __DIR__ . '/form/' . $this->strategy . '/lib.php';
            if (is_readable($strategylib)) {
                require_once($strategylib);
            } else {
                throw new coding_exception('the grading forms subplugin must contain library ' . $strategylib);
            }
            $classname = 'workshop_' . $this->strategy . '_strategy';
            $this->strategyinstance = new $classname($this);
            if (!in_array('workshop_strategy', class_implements($this->strategyinstance))) {
                throw new coding_exception($classname . ' does not implement workshop_strategy interface');
            }
        }
        return $this->strategyinstance;
    }
public function grading_strategy_instance ( ) { global $ CFG ; // because we require other libs here if ( is_null ( $ this -> strategyinstance ) ) { $ strategylib = __DIR__ . '/form/' . $ this -> strategy . '/lib.php' ; if ( is_readable ( $ strategylib ) ) { require_once ( $ strategylib ) ; } else { throw new coding_exception ( 'the grading forms subplugin must contain library ' . $ strategylib ) ; } $ classname = 'workshop_' . $ this -> strategy . '_strategy' ; $ this -> strategyinstance = new $ classname ( $ this ) ; if ( ! in_array ( 'workshop_strategy' , class_implements ( $ this -> strategyinstance ) ) ) { throw new coding_exception ( $ classname . ' does not implement workshop_strategy interface' ) ; } } return $ this -> strategyinstance ; }
Returns instance of grading strategy class

@return stdclass Instance of a grading strategy
Returns instance of grading strategy class