original_string: public function get_user_search_button() {
          static $count = 0;
          if (!has_capability('moodle/role:assign', $this->manager->get_context())) {
              return false;
          }
          $count++;
          $url = new moodle_url('/admin/roles/assign.php', array('contextid'=>$this->manager->get_context()->id, 'sesskey'=>sesskey()));
          $control = new single_button($url, get_string('assignroles', 'role'), 'get');
          $control->class = 'singlebutton assignuserrole instance'.$count;
          if ($count == 1) {
              $this->manager->get_moodlepage()->requires->strings_for_js(array(
                      'ajaxoneuserfound',
                      'ajaxxusersfound',
                      'ajaxxmoreusersfound',
                      'ajaxnext25',
                      'enrol',
                      'enrolmentoptions',
                      'enrolusers',
                      'enrolxusers',
                      'errajaxfailedenrol',
                      'errajaxsearch',
                      'foundxcohorts',
                      'none',
                      'usersearch',
                      'unlimitedduration',
                      'startdatetoday',
                      'durationdays',
                      'enrolperiod'), 'enrol');
              $this->manager->get_moodlepage()->requires->string_for_js('assignrole', 'role');
  
              $modules = array('moodle-enrol-otherusersmanager', 'moodle-enrol-otherusersmanager-skin');
              $function = 'M.enrol.otherusersmanager.init';
              $arguments = array(
                  'courseId'=> $this->manager->get_course()->id,
                  'ajaxUrl' => '/enrol/ajax.php',
                  'url' => $this->manager->get_moodlepage()->url->out(false));
              $this->manager->get_moodlepage()->requires->yui_module($modules, $function, array($arguments));
          }
          return $control;
      }
code: public function get_user_search_button() {
          static $count = 0;
          if (!has_capability('moodle/role:assign', $this->manager->get_context())) {
              return false;
          }
          $count++;
          $url = new moodle_url('/admin/roles/assign.php', array('contextid'=>$this->manager->get_context()->id, 'sesskey'=>sesskey()));
          $control = new single_button($url, get_string('assignroles', 'role'), 'get');
          $control->class = 'singlebutton assignuserrole instance'.$count;
          if ($count == 1) {
              $this->manager->get_moodlepage()->requires->strings_for_js(array(
                      'ajaxoneuserfound',
                      'ajaxxusersfound',
                      'ajaxxmoreusersfound',
                      'ajaxnext25',
                      'enrol',
                      'enrolmentoptions',
                      'enrolusers',
                      'enrolxusers',
                      'errajaxfailedenrol',
                      'errajaxsearch',
                      'foundxcohorts',
                      'none',
                      'usersearch',
                      'unlimitedduration',
                      'startdatetoday',
                      'durationdays',
                      'enrolperiod'), 'enrol');
              $this->manager->get_moodlepage()->requires->string_for_js('assignrole', 'role');
  
              $modules = array('moodle-enrol-otherusersmanager', 'moodle-enrol-otherusersmanager-skin');
              $function = 'M.enrol.otherusersmanager.init';
              $arguments = array(
                  'courseId'=> $this->manager->get_course()->id,
                  'ajaxUrl' => '/enrol/ajax.php',
                  'url' => $this->manager->get_moodlepage()->url->out(false));
              $this->manager->get_moodlepage()->requires->yui_module($modules, $function, array($arguments));
          }
          return $control;
      }
code_tokens: public function get_user_search_button ( ) { static $ count = 0 ; if ( ! has_capability ( 'moodle/role:assign' , $ this -> manager -> get_context ( ) ) ) { return false ; } $ count ++ ; $ url = new moodle_url ( '/admin/roles/assign.php' , array ( 'contextid' => $ this -> manager -> get_context ( ) -> id , 'sesskey' => sesskey ( ) ) ) ; $ control = new single_button ( $ url , get_string ( 'assignroles' , 'role' ) , 'get' ) ; $ control -> class = 'singlebutton assignuserrole instance' . $ count ; if ( $ count == 1 ) { $ this -> manager -> get_moodlepage ( ) -> requires -> strings_for_js ( array ( 'ajaxoneuserfound' , 'ajaxxusersfound' , 'ajaxxmoreusersfound' , 'ajaxnext25' , 'enrol' , 'enrolmentoptions' , 'enrolusers' , 'enrolxusers' , 'errajaxfailedenrol' , 'errajaxsearch' , 'foundxcohorts' , 'none' , 'usersearch' , 'unlimitedduration' , 'startdatetoday' , 'durationdays' , 'enrolperiod' ) , 'enrol' ) ; $ this -> manager -> get_moodlepage ( ) -> requires -> string_for_js ( 'assignrole' , 'role' ) ; $ modules = array ( 'moodle-enrol-otherusersmanager' , 'moodle-enrol-otherusersmanager-skin' ) ; $ function = 'M.enrol.otherusersmanager.init' ; $ arguments = array ( 'courseId' => $ this -> manager -> get_course ( ) -> id , 'ajaxUrl' => '/enrol/ajax.php' , 'url' => $ this -> manager -> get_moodlepage ( ) -> url -> out ( false ) ) ; $ this -> manager -> get_moodlepage ( ) -> requires -> yui_module ( $ modules , $ function , array ( $ arguments ) ) ; } return $ control ; }
docstring: Gets a button to search users and assign them roles in the course.
  
  @staticvar int $count
  @param int $page
  @return single_button
docstring_tokens: Gets a button to search users and assign them roles in the course .