Support » Plugin: WP Survey And Quiz Tool » [Plugin: WP Survey And Quiz Tool] Answers not listing in proper order

  • product247

    (@product247)


    The answers are written as:

    a.) this is an answer
    b.) this is an answer
    c.) this is an answer
    d.) this is an answer
    e.) this is an answer

    it is written exactly as above with the “a.)” so I would think it would pick this up and list it alphabetically in asc or dec depending on what I specified in the section editor. I’ve set the difficulty to every setting but no matter what I do it displays in random order like this:

    b.) this is an answer
    a.) this is an answer
    e.) this is an answer
    c.) this is an answer
    d.) this is an answer

    Is there any way to control this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Backie

    (@backie)

    Currently the only way to have it not be random is to edit line 279 and add ORDER BY ASC or DESC depending on what you want. In the next major there may (very likely) will be an option to be able configure this.

    Thread Starter product247

    (@product247)

    Awesome it worked. Just for the record here is what I did.

    went to plugins > wp-survey-and-quiz-tool > includes > site > quiz.php

    It was actually around line 268

    This is the modified line of code:

    $answers = $wpdb->get_results( $wpdb->prepare('SELECT id,text,correct FROM '.WPSQT_ANSWER_TABLE.' WHERE questionid = %d ORDER BY text ASC', array($origQuestion['id']) ), ARRAY_A);

    Here is the site where I have used your plugin: http://www.passthischirotest.com

    Thanks Again!

    Trew Knowledge

    (@trewknowledge)

    SOLVED: I had to add the a) b) c..etc before my answers.

    Is there a way to have the answers appear in the order as I add them in questions section?

    *********
    I am having a similar problem to prodcut247. I have pasted the code above to the quiz.php file but my answers are still all random.

    Is there any other way I may be able to have my questions not displayed randomly?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP Survey And Quiz Tool] Answers not listing in proper order’ is closed to new replies.