original_string: public function review_link($url, $reviewinpopup, $popupoptions) {
          if ($reviewinpopup) {
              $button = new single_button($url, get_string('review', 'quiz'));
              $button->add_action(new popup_action('click', $url, 'quizpopup', $popupoptions));
              return $this->render($button);
  
          } else {
              return html_writer::link($url, get_string('review', 'quiz'),
                      array('title' => get_string('reviewthisattempt', 'quiz')));
          }
      }
code: public function review_link($url, $reviewinpopup, $popupoptions) {
          if ($reviewinpopup) {
              $button = new single_button($url, get_string('review', 'quiz'));
              $button->add_action(new popup_action('click', $url, 'quizpopup', $popupoptions));
              return $this->render($button);
  
          } else {
              return html_writer::link($url, get_string('review', 'quiz'),
                      array('title' => get_string('reviewthisattempt', 'quiz')));
          }
      }
code_tokens: public function review_link ( $ url , $ reviewinpopup , $ popupoptions ) { if ( $ reviewinpopup ) { $ button = new single_button ( $ url , get_string ( 'review' , 'quiz' ) ) ; $ button -> add_action ( new popup_action ( 'click' , $ url , 'quizpopup' , $ popupoptions ) ) ; return $ this -> render ( $ button ) ; } else { return html_writer :: link ( $ url , get_string ( 'review' , 'quiz' ) , array ( 'title' => get_string ( 'reviewthisattempt' , 'quiz' ) ) ) ; } }
docstring: Output either a link to the review page for an attempt, or a button to
  open the review in a popup window.
  
  @param moodle_url $url of the target page.
  @param bool $reviewinpopup whether a pop-up is required.
  @param array $popupoptions options to pass to the popup_action constructor.
  @return string HTML to output.
docstring_tokens: Output either a link to the review page for an attempt or a button to open the review in a popup window .