original_string: public function get_quiz() {
          global $DB;
  
          if (empty($this->quiz)) {
              if (empty($this->record->quizid)) {
                  throw new \coding_exception('quizid is not set.');
              }
              $this->quiz = $DB->get_record('quiz', array('id' => $this->record->quizid));
          }
  
          return $this->quiz;
      }
code: public function get_quiz() {
          global $DB;
  
          if (empty($this->quiz)) {
              if (empty($this->record->quizid)) {
                  throw new \coding_exception('quizid is not set.');
              }
              $this->quiz = $DB->get_record('quiz', array('id' => $this->record->quizid));
          }
  
          return $this->quiz;
      }
code_tokens: public function get_quiz ( ) { global $ DB ; if ( empty ( $ this -> quiz ) ) { if ( empty ( $ this -> record -> quizid ) ) { throw new \ coding_exception ( 'quizid is not set.' ) ; } $ this -> quiz = $ DB -> get_record ( 'quiz' , array ( 'id' => $ this -> record -> quizid ) ) ; } return $ this -> quiz ; }
docstring: Returns the quiz for this question slot.
  The quiz is fetched the first time it is requested and then stored in a member variable to be returned each subsequent time.
  
  @return mixed
  @throws \coding_exception
docstring_tokens: Returns the quiz for this question slot . The quiz is fetched the first time it is requested and then stored in a member variable to be returned each subsequent time .