original_string: protected function initialise_javascript($search) {
          global $USER, $PAGE, $OUTPUT;
          $output = '';
  
          // Put the options into the session, to allow search.php to respond to the ajax requests.
          $options = $this->get_options();
          $hash = md5(serialize($options));
          $USER->userselectors[$hash] = $options;
  
          // Initialise the selector.
          $PAGE->requires->js_init_call(
              'M.core_user.init_user_selector',
              array($this->name, $hash, $this->extrafields, $search),
              false,
              self::$jsmodule
          );
          return $output;
      }
code: protected function initialise_javascript($search) {
          global $USER, $PAGE, $OUTPUT;
          $output = '';
  
          // Put the options into the session, to allow search.php to respond to the ajax requests.
          $options = $this->get_options();
          $hash = md5(serialize($options));
          $USER->userselectors[$hash] = $options;
  
          // Initialise the selector.
          $PAGE->requires->js_init_call(
              'M.core_user.init_user_selector',
              array($this->name, $hash, $this->extrafields, $search),
              false,
              self::$jsmodule
          );
          return $output;
      }
code_tokens: protected function initialise_javascript ( $ search ) { global $ USER , $ PAGE , $ OUTPUT ; $ output = '' ; // Put the options into the session, to allow search.php to respond to the ajax requests. $ options = $ this -> get_options ( ) ; $ hash = md5 ( serialize ( $ options ) ) ; $ USER -> userselectors [ $ hash ] = $ options ; // Initialise the selector. $ PAGE -> requires -> js_init_call ( 'M.core_user.init_user_selector' , array ( $ this -> name , $ hash , $ this -> extrafields , $ search ) , false , self :: $ jsmodule ) ; return $ output ; }
docstring: Initialises JS for this control.
  
  @param string $search
  @return string any HTML needed here.
docstring_tokens: Initialises JS for this control .