original_string: public function view_information($quiz, $cm, $context, $messages) {
          global $CFG;
  
          $output = '';
  
          // Print quiz name and description.
          $output .= $this->heading(format_string($quiz->name));
          $output .= $this->quiz_intro($quiz, $cm);
  
          // Output any access messages.
          if ($messages) {
              $output .= $this->box($this->access_messages($messages), 'quizinfo');
          }
  
          // Show number of attempts summary to those who can view reports.
          if (has_capability('mod/quiz:viewreports', $context)) {
              if ($strattemptnum = $this->quiz_attempt_summary_link_to_reports($quiz, $cm,
                      $context)) {
                  $output .= html_writer::tag('div', $strattemptnum,
                          array('class' => 'quizattemptcounts'));
              }
          }
          return $output;
      }
code: public function view_information($quiz, $cm, $context, $messages) {
          global $CFG;
  
          $output = '';
  
          // Print quiz name and description.
          $output .= $this->heading(format_string($quiz->name));
          $output .= $this->quiz_intro($quiz, $cm);
  
          // Output any access messages.
          if ($messages) {
              $output .= $this->box($this->access_messages($messages), 'quizinfo');
          }
  
          // Show number of attempts summary to those who can view reports.
          if (has_capability('mod/quiz:viewreports', $context)) {
              if ($strattemptnum = $this->quiz_attempt_summary_link_to_reports($quiz, $cm,
                      $context)) {
                  $output .= html_writer::tag('div', $strattemptnum,
                          array('class' => 'quizattemptcounts'));
              }
          }
          return $output;
      }
code_tokens: public function view_information ( $ quiz , $ cm , $ context , $ messages ) { global $ CFG ; $ output = '' ; // Print quiz name and description. $ output .= $ this -> heading ( format_string ( $ quiz -> name ) ) ; $ output .= $ this -> quiz_intro ( $ quiz , $ cm ) ; // Output any access messages. if ( $ messages ) { $ output .= $ this -> box ( $ this -> access_messages ( $ messages ) , 'quizinfo' ) ; } // Show number of attempts summary to those who can view reports. if ( has_capability ( 'mod/quiz:viewreports' , $ context ) ) { if ( $ strattemptnum = $ this -> quiz_attempt_summary_link_to_reports ( $ quiz , $ cm , $ context ) ) { $ output .= html_writer :: tag ( 'div' , $ strattemptnum , array ( 'class' => 'quizattemptcounts' ) ) ; } } return $ output ; }
docstring: Output the page information
  
  @param object $quiz the quiz settings.
  @param object $cm the course_module object.
  @param object $context the quiz context.
  @param array $messages any access messages that should be described.
  @return string HTML to output.
docstring_tokens: Output the page information