<?PHP
##Included by snoopy.php to determine whether the subject gets a certificate.
##This will end up being more intensive than it is originally.

if ($stopthis == 1)
  $decide=0;
else
{
  $nq=$nright=$nwrong=0;
  foreach($_SESSION['questions']['questions'] as $question)
  {
    $nq++;
    if ($question['correct'] == $question['answer'])
      $nright++;
    else
      $nwrong++;
  }
  if ($nright > (SNOOPYPASSING*$nq))
    $decide=1;
  else
    $decide=0;
}
?>
