• If you ignore all the questions in a section, the section is not counted towards the mark at the end.

    So, if for example, you fill in one section of 10 questions and then ignore the rest of the questions (say 100 in total), you get a message at the end saying:

    “You got x out of 10”.

    What it should say is:

    “You got x out of 100”.

    J.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jnthnlstr

    (@jnthnlstr)

    Looks like this is caused by line 91 in /includes/sitequiz.php:

    if ( isset($_POST['answers']) ){
       // then the answers and stats arrays are created

    Perhaps you could name the submit button and make that what is looked for instead of $_POST['answers']?

    J.

    Hi,

    Nice catch, while your solution does sound sensible, it would result in unnecessary processing. However if you look in wpsqt_site_quiz_finish() in quiz.php at 312, you’ll notice.

    if ( isset($quizSection['stats']['correct']) ){
    			$correctAnswers += $quizSection['stats']['correct'];
    			$totalQuestions += sizeof($quizSection['questions']);
    		}

    Which should be.

    if ( isset($quizSection['stats']['correct']) ){
    			$correctAnswers += $quizSection['stats']['correct'];
    		}
    		$totalQuestions += sizeof($quizSection['questions']);
    Thread Starter jnthnlstr

    (@jnthnlstr)

    Hi,

    Good fix.

    J.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP Survey And Quiz Tool] If you don't answer any questions in a section, that section’ is closed to new replies.