Beispiel #1
0
 case 'evaluate':
     // Fragebogen auswerten
     //Wertzuweisung und Initalisierung
     $selectedAnswers = 0;
     if (isset($_REQUEST['selectedAnswers'])) {
         $selectedAnswers = $_REQUEST['selectedAnswers'];
         $_SESSION['values']['selectedAnswers'] = $selectedAnswers;
     }
     if (isset($_SESSION['values']['selectedAnswers'])) {
         $topic = 0;
         if (isset($_REQUEST["t_id"])) {
             $topic = abs(intval($_REQUEST["t_id"]));
         }
         $myQuiz->setQuestions();
         $myQuiz->setSelectedAnswers();
         $myQuiz->setAnswers();
         $myQuiz->updateStatistic();
         $topics->setTopicID($topic);
         $numOfQu = $topics->getNumOfQu();
         $percentage = $topics->getRawToPass();
         $myQuiz->setTopicID($topic);
         $myQuiz->setQuestionLimit($numOfQu);
         $myQuiz->setRawToPass($percentage);
         $myQuiz->evaluateQuiz();
     } else {
         // kein Test bearbeitet
     }
     break;
 case "requestCert":
     $topic = 0;
     if (isset($_REQUEST["t_id"])) {