Beispiel #1
0
     // Versuche anzeigen mit bestandenen
     $value = getStatisticInfoPie($t_id);
     if ($value[0][1] == 0 && $value[1][1] == 0) {
         echo '<div class="h8 centered">' . Global_07 . '</div>';
     } else {
         showPie($value);
     }
     break;
 case 'topTen':
     // die besten 10 antworten
     $questions = 0;
     $questions = getQuestions($t_id);
     if (count($questions) == 0) {
         echo '<div class="h8 centered">' . Global_07 . "</div>";
     } else {
         $topics->setTopicID($t_id);
         $topics->setTopic($t_id);
         $Topic = $topics->getTopicName();
         echo "<br /><h2> " . Statistic_01 . " " . stripslashes($Topic) . "<br /></h2>";
         getTopTenCorrect($questions);
     }
     break;
 case 'flopTen':
     // die 10 schlechtest beantworteten Fragen
     $questions = 0;
     $questions = getQuestions($t_id);
     if (count($questions) == 0) {
         echo '<div class="h8 centered">' . Global_07 . "</div>";
     } else {
         $topics->setTopicID($t_id);
         $topics->setTopic($t_id);
Beispiel #2
0
             } else {
                 echo " <meta http-equiv='refresh' content='0; url=?site=topic&amp;action=new_topic&amp;error={$reply}' />";
             }
         }
     }
     break;
 case 'new_topic':
     // neues Topic
     if ($error) {
         $topics->setError($error);
     }
     $topics->newForm();
     break;
 case 'setTopicInactive':
     //inaktiv setzen
     $topics->setTopicID($t_id);
     $topics->setInactiveTopic();
     echo " <meta http-equiv='refresh' content='0; url=?site=topic' />";
     break;
 case 'setTopicAvtive':
     //aktivieren
     $topics->setTopicID($t_id);
     $topics->setActiveTopic();
     echo " <meta http-equiv='refresh' content='0; url=?site=topic' />";
     break;
 case 'delTopic':
     // Löschen eines Themas
     $questionArray = array();
     reallyDelTopic($t_id);
     if ($_REQUEST['submit'] == Global_13) {
         $topics->setTopicID($t_id);
Beispiel #3
0
 unset($_SESSION['values']['t_id']);
 unset($_SESSION['values']['return_site']);
 // Auswahl der gewählten Aktionen
 switch ($action) {
     case 'getQuestions':
         // Fragebogen genererien
         // Überbrüfung auf integer / Wertzuweisung
         $topic = 0;
         if (isset($_REQUEST["t_id"])) {
             $topic = abs(intval($_REQUEST["t_id"]));
         }
         // Session Variable leeren
         if (isset($_SESSION['values']['answerList'])) {
             unset($_SESSION['values']['answerList']);
         }
         $topics->setTopicID($topic);
         $numOfQu = $topics->getNumOfQu();
         $percentage = $topics->getRawToPass();
         $myQuiz->setTopicID($topic);
         $myQuiz->setQuestionLimit($numOfQu);
         $myQuiz->setRawToPass($percentage);
         $value = $myQuiz->generateQuestions();
         if ($value != 'notEnoughQuestions') {
             $myQuiz->getDBAnswers();
             $myQuiz->showQuiz();
             $t_id = $myQuiz->getTopicID();
         }
         break;
     case 'evaluate':
         // Fragebogen auswerten
         //Wertzuweisung und Initalisierung