/**
  * Compares the generated result with the user's result.
  *
  * @return boolean
  * @author	Reinhard Führicht <*****@*****.**>
  */
 public function validateCaptcha()
 {
     $valid = true;
     require_once t3lib_extMgm::extPath('mathguard') . 'res/ClassMathGuard.php';
     if (!MathGuard::checkResult($_REQUEST['mathguard_answer'], $_REQUEST['mathguard_code'])) {
         $valid = false;
     }
     return $valid;
 }
 /** this function returns math expression into your form, the parameter is optional
  * quite simmilar to insertQuestion, but returns the output as a text instead of echoing
  */
 function returnQuestion($question = QUESTION, $color = COLOR, $prime = 37)
 {
     //default prime is 37, you can change it when specifying the different parameter
     $output = MathGuard::produceOutput($question, $color, $prime);
     return $output;
 }