original_string: public function confirm($message, $continue, $cancel) {
          // We need plain styling of confirm boxes on upgrade because we don't know which stylesheet we have (it could be
          // from any previous version of Moodle).
          if ($continue instanceof single_button) {
              $continue->primary = true;
          } else if (is_string($continue)) {
              $continue = new single_button(new moodle_url($continue), get_string('continue'), 'post', true);
          } else if ($continue instanceof moodle_url) {
              $continue = new single_button($continue, get_string('continue'), 'post', true);
          } else {
              throw new coding_exception('The continue param to $OUTPUT->confirm() must be either a URL' .
                                         ' (string/moodle_url) or a single_button instance.');
          }
  
          if ($cancel instanceof single_button) {
              $output = '';
          } else if (is_string($cancel)) {
              $cancel = new single_button(new moodle_url($cancel), get_string('cancel'), 'get');
          } else if ($cancel instanceof moodle_url) {
              $cancel = new single_button($cancel, get_string('cancel'), 'get');
          } else {
              throw new coding_exception('The cancel param to $OUTPUT->confirm() must be either a URL' .
                                         ' (string/moodle_url) or a single_button instance.');
          }
  
          $output = $this->box_start('generalbox', 'notice');
          $output .= html_writer::tag('h4', get_string('confirm'));
          $output .= html_writer::tag('p', $message);
          $output .= html_writer::tag('div', $this->render($continue) . $this->render($cancel), array('class' => 'buttons'));
          $output .= $this->box_end();
          return $output;
      }
code: public function confirm($message, $continue, $cancel) {
          // We need plain styling of confirm boxes on upgrade because we don't know which stylesheet we have (it could be
          // from any previous version of Moodle).
          if ($continue instanceof single_button) {
              $continue->primary = true;
          } else if (is_string($continue)) {
              $continue = new single_button(new moodle_url($continue), get_string('continue'), 'post', true);
          } else if ($continue instanceof moodle_url) {
              $continue = new single_button($continue, get_string('continue'), 'post', true);
          } else {
              throw new coding_exception('The continue param to $OUTPUT->confirm() must be either a URL' .
                                         ' (string/moodle_url) or a single_button instance.');
          }
  
          if ($cancel instanceof single_button) {
              $output = '';
          } else if (is_string($cancel)) {
              $cancel = new single_button(new moodle_url($cancel), get_string('cancel'), 'get');
          } else if ($cancel instanceof moodle_url) {
              $cancel = new single_button($cancel, get_string('cancel'), 'get');
          } else {
              throw new coding_exception('The cancel param to $OUTPUT->confirm() must be either a URL' .
                                         ' (string/moodle_url) or a single_button instance.');
          }
  
          $output = $this->box_start('generalbox', 'notice');
          $output .= html_writer::tag('h4', get_string('confirm'));
          $output .= html_writer::tag('p', $message);
          $output .= html_writer::tag('div', $this->render($continue) . $this->render($cancel), array('class' => 'buttons'));
          $output .= $this->box_end();
          return $output;
      }
code_tokens: public function confirm ( $ message , $ continue , $ cancel ) { // We need plain styling of confirm boxes on upgrade because we don't know which stylesheet we have (it could be // from any previous version of Moodle). if ( $ continue instanceof single_button ) { $ continue -> primary = true ; } else if ( is_string ( $ continue ) ) { $ continue = new single_button ( new moodle_url ( $ continue ) , get_string ( 'continue' ) , 'post' , true ) ; } else if ( $ continue instanceof moodle_url ) { $ continue = new single_button ( $ continue , get_string ( 'continue' ) , 'post' , true ) ; } else { throw new coding_exception ( 'The continue param to $OUTPUT->confirm() must be either a URL' . ' (string/moodle_url) or a single_button instance.' ) ; } if ( $ cancel instanceof single_button ) { $ output = '' ; } else if ( is_string ( $ cancel ) ) { $ cancel = new single_button ( new moodle_url ( $ cancel ) , get_string ( 'cancel' ) , 'get' ) ; } else if ( $ cancel instanceof moodle_url ) { $ cancel = new single_button ( $ cancel , get_string ( 'cancel' ) , 'get' ) ; } else { throw new coding_exception ( 'The cancel param to $OUTPUT->confirm() must be either a URL' . ' (string/moodle_url) or a single_button instance.' ) ; } $ output = $ this -> box_start ( 'generalbox' , 'notice' ) ; $ output .= html_writer :: tag ( 'h4' , get_string ( 'confirm' ) ) ; $ output .= html_writer :: tag ( 'p' , $ message ) ; $ output .= html_writer :: tag ( 'div' , $ this -> render ( $ continue ) . $ this -> render ( $ cancel ) , array ( 'class' => 'buttons' ) ) ; $ output .= $ this -> box_end ( ) ; return $ output ; }
docstring: Overridden confirm message for upgrades.
  
  @param string $message The question to ask the user
  @param single_button|moodle_url|string $continue The single_button component representing the Continue answer.
  @param single_button|moodle_url|string $cancel The single_button component representing the Cancel answer.
  @return string HTML fragment
docstring_tokens: Overridden confirm message for upgrades .