original_string: public function get_filtered_enrolment_plugin() {
          $instances = $this->get_enrolment_instances();
          $plugins = $this->get_enrolment_plugins(false);
  
          if (empty($this->instancefilter) || !array_key_exists($this->instancefilter, $instances)) {
              return false;
          }
  
          $instance = $instances[$this->instancefilter];
          return $plugins[$instance->enrol];
      }
code: public function get_filtered_enrolment_plugin() {
          $instances = $this->get_enrolment_instances();
          $plugins = $this->get_enrolment_plugins(false);
  
          if (empty($this->instancefilter) || !array_key_exists($this->instancefilter, $instances)) {
              return false;
          }
  
          $instance = $instances[$this->instancefilter];
          return $plugins[$instance->enrol];
      }
code_tokens: public function get_filtered_enrolment_plugin ( ) { $ instances = $ this -> get_enrolment_instances ( ) ; $ plugins = $ this -> get_enrolment_plugins ( false ) ; if ( empty ( $ this -> instancefilter ) || ! array_key_exists ( $ this -> instancefilter , $ instances ) ) { return false ; } $ instance = $ instances [ $ this -> instancefilter ] ; return $ plugins [ $ instance -> enrol ] ; }
docstring: Returns the enrolment plugin that the course manager was being filtered to.
  
  If no filter was being applied then this function returns false.
  
  @return enrol_plugin
docstring_tokens: Returns the enrolment plugin that the course manager was being filtered to .