original_string: private function remove_button($buttonname) {
          $el = $this->_form->getElement('buttonar');
          foreach ($el->_elements as $idx => $button) {
              if ($button instanceof MoodleQuickForm_submit && $button->getName() === $buttonname) {
                  unset($el->_elements[$idx]);
                  return;
              }
          }
      }
code: private function remove_button($buttonname) {
          $el = $this->_form->getElement('buttonar');
          foreach ($el->_elements as $idx => $button) {
              if ($button instanceof MoodleQuickForm_submit && $button->getName() === $buttonname) {
                  unset($el->_elements[$idx]);
                  return;
              }
          }
      }
code_tokens: private function remove_button ( $ buttonname ) { $ el = $ this -> _form -> getElement ( 'buttonar' ) ; foreach ( $ el -> _elements as $ idx => $ button ) { if ( $ button instanceof MoodleQuickForm_submit && $ button -> getName ( ) === $ buttonname ) { unset ( $ el -> _elements [ $ idx ] ) ; return ; } } }
docstring: Removes the button that is not applicable for the current page
  
  @param string $buttonname
docstring_tokens: Removes the button that is not applicable for the current page