if ($row_resultMode['display_mode'] == "test_simple") { $mode = "test_simple"; } if ($row_resultMode['display_mode'] == "test_custom") { $mode = "test_custom"; } } while ($row_resultMode = mysql_fetch_assoc($resultMode)); // $mode = "simple"; //LIEN SIMPLE // check the number of results if ($mode == "simple" || $mode == "accurate") { $numResults = $quiz->getResultsMulti("count"); } else { $numResults = $quiz->getResultsTest("count"); } // check the number of questions $numQuestions = $quiz->getQuestions("count"); // check the number of options $listQuestion = explode(',', $quiz->getQuestions()); $totalOptions = 0; if ($numQuestions != 0) { $questionState = true; $optionState = true; foreach ($listQuestion as $question) { // check the number of options for this question if ($mode == "simple" || $mode == "accurate") { $numOptions = $quiz->getOptionsMulti($question, "count"); } else { $numOptions = $quiz->getOptionsTest($question, "count"); } if ($numOptions < $VAR_QUIZ_MIN_OPTIONS) { $optionState = false;
if($quiz->exists()){ // check if member is the owner of this quiz if($quiz->isOwner($member->id)){ // prepare the formatted status switch($quiz->isPublished){ case 0: $status = '<span class="draft">Unpublished Draft</span>'; break; case 1: $status = '<span class="published">Published</span>'; break; case 2: $status = '<span class="modified">Unpublished Modification</span>'; break; case 3: $status = '<span class="archived">Archived</span>'; break; default: $status = 'Limbo :/'; break; } // get average options // check the number of questions $numQuestions = $quiz->getQuestions("count"); // check the number of options $listQuestion = explode(',', $quiz->getQuestions()); $totalOptions = 0; if($numQuestions != 0){ $questionState = true; $optionState = true; foreach($listQuestion as $question){ // check the number of options for this question $numOptions = $quiz->getOptions($question, "count"); if($numOptions < $VAR_QUIZ_MIN_OPTIONS){ $optionState = false; } $totalOptions += $numOptions; }