original_string: public function view_page_notenrolled($course, $quiz, $cm, $context, $messages) {
          global $CFG;
          $output = '';
          $output .= $this->view_information($quiz, $cm, $context, $messages);
          $youneedtoenrol = html_writer::tag('p', get_string('youneedtoenrol', 'quiz'));
          $button = html_writer::tag('p',
                  $this->continue_button($CFG->wwwroot . '/course/view.php?id=' . $course->id));
          $output .= $this->box($youneedtoenrol."\n\n".$button."\n", 'generalbox', 'notice');
          return $output;
      }
code: public function view_page_notenrolled($course, $quiz, $cm, $context, $messages) {
          global $CFG;
          $output = '';
          $output .= $this->view_information($quiz, $cm, $context, $messages);
          $youneedtoenrol = html_writer::tag('p', get_string('youneedtoenrol', 'quiz'));
          $button = html_writer::tag('p',
                  $this->continue_button($CFG->wwwroot . '/course/view.php?id=' . $course->id));
          $output .= $this->box($youneedtoenrol."\n\n".$button."\n", 'generalbox', 'notice');
          return $output;
      }
code_tokens: public function view_page_notenrolled ( $ course , $ quiz , $ cm , $ context , $ messages ) { global $ CFG ; $ output = '' ; $ output .= $ this -> view_information ( $ quiz , $ cm , $ context , $ messages ) ; $ youneedtoenrol = html_writer :: tag ( 'p' , get_string ( 'youneedtoenrol' , 'quiz' ) ) ; $ button = html_writer :: tag ( 'p' , $ this -> continue_button ( $ CFG -> wwwroot . '/course/view.php?id=' . $ course -> id ) ) ; $ output .= $ this -> box ( $ youneedtoenrol . "\n\n" . $ button . "\n" , 'generalbox' , 'notice' ) ; return $ output ; }
docstring: Outputs and error message for anyone who is not enrolle don the course
  
  @param int $course The course ID
  @param array $quiz Array contingin quiz data
  @param int $cm Course Module ID
  @param int $context The page contect ID
  @param array $messages Array containing any messages
docstring_tokens: Outputs and error message for anyone who is not enrolle don the course