original_string: public function add_action_buttons($cancel = true, $submitlabel = null) {
          $mform =& $this->_form;
          $buttonarray = array();
          $buttonarray[] = &$mform->createElement('submit', 'showpreview', get_string('preview', 'tool_uploadcourse'));
          $buttonarray[] = &$mform->createElement('submit', 'submitbutton', $submitlabel);
          $buttonarray[] = &$mform->createElement('cancel');
          $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
          $mform->closeHeaderBefore('buttonar');
      }
code: public function add_action_buttons($cancel = true, $submitlabel = null) {
          $mform =& $this->_form;
          $buttonarray = array();
          $buttonarray[] = &$mform->createElement('submit', 'showpreview', get_string('preview', 'tool_uploadcourse'));
          $buttonarray[] = &$mform->createElement('submit', 'submitbutton', $submitlabel);
          $buttonarray[] = &$mform->createElement('cancel');
          $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
          $mform->closeHeaderBefore('buttonar');
      }
code_tokens: public function add_action_buttons ( $ cancel = true , $ submitlabel = null ) { $ mform = & $ this -> _form ; $ buttonarray = array ( ) ; $ buttonarray [ ] = & $ mform -> createElement ( 'submit' , 'showpreview' , get_string ( 'preview' , 'tool_uploadcourse' ) ) ; $ buttonarray [ ] = & $ mform -> createElement ( 'submit' , 'submitbutton' , $ submitlabel ) ; $ buttonarray [ ] = & $ mform -> createElement ( 'cancel' ) ; $ mform -> addGroup ( $ buttonarray , 'buttonar' , '' , array ( ' ' ) , false ) ; $ mform -> closeHeaderBefore ( 'buttonar' ) ; }
docstring: Add actopm buttons.
  
  @param bool $cancel whether to show cancel button, default true
  @param string $submitlabel label for submit button, defaults to get_string('savechanges')
  @return void
docstring_tokens: Add actopm buttons .