original_string: public function check_answer() {
          $result = new stdClass;
          $result->answerid        = 0;
          $result->noanswer        = false;
          $result->correctanswer   = false;
          $result->isessayquestion = false;   // use this to turn off review button on essay questions
          $result->response        = '';
          $result->newpageid       = 0;       // stay on the page
          $result->studentanswer   = '';      // use this to store student's answer(s) in order to display it on feedback page
          $result->studentanswerformat = FORMAT_MOODLE;
          $result->userresponse    = null;
          $result->feedback        = '';
          // Store data that was POSTd by a form. This is currently used to perform any logic after the 1st write to the db
          // of the attempt.
          $result->postdata        = false;
          $result->nodefaultresponse  = false; // Flag for redirecting when default feedback is turned off
          $result->inmediatejump = false; // Flag to detect when we should do a jump from the page without further processing.
          return $result;
      }
code: public function check_answer() {
          $result = new stdClass;
          $result->answerid        = 0;
          $result->noanswer        = false;
          $result->correctanswer   = false;
          $result->isessayquestion = false;   // use this to turn off review button on essay questions
          $result->response        = '';
          $result->newpageid       = 0;       // stay on the page
          $result->studentanswer   = '';      // use this to store student's answer(s) in order to display it on feedback page
          $result->studentanswerformat = FORMAT_MOODLE;
          $result->userresponse    = null;
          $result->feedback        = '';
          // Store data that was POSTd by a form. This is currently used to perform any logic after the 1st write to the db
          // of the attempt.
          $result->postdata        = false;
          $result->nodefaultresponse  = false; // Flag for redirecting when default feedback is turned off
          $result->inmediatejump = false; // Flag to detect when we should do a jump from the page without further processing.
          return $result;
      }
code_tokens: public function check_answer ( ) { $ result = new stdClass ; $ result -> answerid = 0 ; $ result -> noanswer = false ; $ result -> correctanswer = false ; $ result -> isessayquestion = false ; // use this to turn off review button on essay questions $ result -> response = '' ; $ result -> newpageid = 0 ; // stay on the page $ result -> studentanswer = '' ; // use this to store student's answer(s) in order to display it on feedback page $ result -> studentanswerformat = FORMAT_MOODLE ; $ result -> userresponse = null ; $ result -> feedback = '' ; // Store data that was POSTd by a form. This is currently used to perform any logic after the 1st write to the db // of the attempt. $ result -> postdata = false ; $ result -> nodefaultresponse = false ; // Flag for redirecting when default feedback is turned off $ result -> inmediatejump = false ; // Flag to detect when we should do a jump from the page without further processing. return $ result ; }
docstring: This method MUST be overridden by all question page types, or page types that
  wish to score a page.
  
  The structure of result should always be the same so it is a good idea when
  overriding this method on a page type to call
  <code>
  $result = parent::check_answer();
  </code>
  before modifying it as required.
  
  @return stdClass
docstring_tokens: This method MUST be overridden by all question page types or page types that wish to score a page .