original_string: public function make_review_link($attempt, $reviewoptions, $output) {
  
          // If the attempt is still open, don't link.
          if (in_array($attempt->state, array(quiz_attempt::IN_PROGRESS, quiz_attempt::OVERDUE))) {
              return $output->no_review_message('');
          }
  
          $when = quiz_attempt_state($this->quizobj->get_quiz(), $attempt);
          $reviewoptions = mod_quiz_display_options::make_from_quiz(
                  $this->quizobj->get_quiz(), $when);
  
          if (!$reviewoptions->attempt) {
              return $output->no_review_message($this->quizobj->cannot_review_message($when, true));
  
          } else {
              return $output->review_link($this->quizobj->review_url($attempt->id),
                      $this->attempt_must_be_in_popup(), $this->get_popup_options());
          }
      }
code: public function make_review_link($attempt, $reviewoptions, $output) {
  
          // If the attempt is still open, don't link.
          if (in_array($attempt->state, array(quiz_attempt::IN_PROGRESS, quiz_attempt::OVERDUE))) {
              return $output->no_review_message('');
          }
  
          $when = quiz_attempt_state($this->quizobj->get_quiz(), $attempt);
          $reviewoptions = mod_quiz_display_options::make_from_quiz(
                  $this->quizobj->get_quiz(), $when);
  
          if (!$reviewoptions->attempt) {
              return $output->no_review_message($this->quizobj->cannot_review_message($when, true));
  
          } else {
              return $output->review_link($this->quizobj->review_url($attempt->id),
                      $this->attempt_must_be_in_popup(), $this->get_popup_options());
          }
      }
code_tokens: public function make_review_link ( $ attempt , $ reviewoptions , $ output ) { // If the attempt is still open, don't link. if ( in_array ( $ attempt -> state , array ( quiz_attempt :: IN_PROGRESS , quiz_attempt :: OVERDUE ) ) ) { return $ output -> no_review_message ( '' ) ; } $ when = quiz_attempt_state ( $ this -> quizobj -> get_quiz ( ) , $ attempt ) ; $ reviewoptions = mod_quiz_display_options :: make_from_quiz ( $ this -> quizobj -> get_quiz ( ) , $ when ) ; if ( ! $ reviewoptions -> attempt ) { return $ output -> no_review_message ( $ this -> quizobj -> cannot_review_message ( $ when , true ) ) ; } else { return $ output -> review_link ( $ this -> quizobj -> review_url ( $ attempt -> id ) , $ this -> attempt_must_be_in_popup ( ) , $ this -> get_popup_options ( ) ) ; } }
docstring: Make some text into a link to review the quiz, if that is appropriate.
  
  @param string $linktext some text.
  @param object $attempt the attempt object
  @return string some HTML, the $linktext either unmodified or wrapped in a
  link to the review page.
docstring_tokens: Make some text into a link to review the quiz if that is appropriate .