Support » Plugin: WP Survey And Quiz Tool » [Plugin: WP Survey And Quiz Tool] Answers appearing in random order – fix

  • Resolved thirdboxcar

    (@thirdboxcar)


    This is more of a bug notification than a request for support! Figured you could easily fix this in future releases:

    My survey question answers were entered in a specific order, but now are appearing in what seems like a random order on the pages. I added this to the survey section.php just before line 12 to fix it for my purposes, but thought you may want to do the same for future releases: <?php sort( $question['answers'] ); ?>

    Lastly, a small feature request: Assuming most folks will test out the survey/quiz before deploying it to the public, maybe add in a button to purge the database of results?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,
    Easier way to fix this “bug” would be change the setting in the section configuration from “random” to ascending or descending order.

    I’ve added that onto the request list.

    I do have it set to descending. It doesn’t seem to affect the answers.

    Looked into this. Changed the SQL to reflect the settings.

    i have this same problem, but unfortunately that fix didn’t work for me.

    hi again,
    i realised mine is a quiz, not a survey as mentioned originally. so to fix that i pasted the line <?php sort( $question['answers'] ); ?> at line 17 in the file called site/quiz/section.php

    I can confirm that the sorting of questions within the quizzes is functional, so just change the setting you’ve chosen in sections and it’ll work.

    Hi Backie,

    I’m using 1.3.20, and the sorting of survey answers still doesn’t work correctly (when you last posted that you’d fixed it, I downloaded the new version but still had to implement my fix). I’ve tried Ascending and Descending, but neither affects the order of the answers on the user’s end, or the order of the answers in the plugin’s interface, or the order of the answers in the results page.

    I’m happy to test subsequent fixes if you need a guinea pig!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WP Survey And Quiz Tool] Answers appearing in random order – fix’ is closed to new replies.