original_string: public function allocator_instance($method) {
          global $CFG;    // because we require other libs here
  
          $allocationlib = __DIR__ . '/allocation/' . $method . '/lib.php';
          if (is_readable($allocationlib)) {
              require_once($allocationlib);
          } else {
              throw new coding_exception('Unable to find the allocation library ' . $allocationlib);
          }
          $classname = 'workshop_' . $method . '_allocator';
          return new $classname($this);
      }
code: public function allocator_instance($method) {
          global $CFG;    // because we require other libs here
  
          $allocationlib = __DIR__ . '/allocation/' . $method . '/lib.php';
          if (is_readable($allocationlib)) {
              require_once($allocationlib);
          } else {
              throw new coding_exception('Unable to find the allocation library ' . $allocationlib);
          }
          $classname = 'workshop_' . $method . '_allocator';
          return new $classname($this);
      }
code_tokens: public function allocator_instance ( $ method ) { global $ CFG ; // because we require other libs here $ allocationlib = __DIR__ . '/allocation/' . $ method . '/lib.php' ; if ( is_readable ( $ allocationlib ) ) { require_once ( $ allocationlib ) ; } else { throw new coding_exception ( 'Unable to find the allocation library ' . $ allocationlib ) ; } $ classname = 'workshop_' . $ method . '_allocator' ; return new $ classname ( $ this ) ; }
docstring: Returns instance of submissions allocator
  
  @param string $method The name of the allocation method, must be PARAM_ALPHA
  @return stdclass Instance of submissions allocator
docstring_tokens: Returns instance of submissions allocator