Support » Plugin: SlickQuiz » Top widget order

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author jewlofthelotus

    (@jewlofthelotus)

    @ciao121 – Hey, thanks for reporting this! I’ve heard this come up as an issue before and I think it might have something to do with the version of PHP or MySQL running on the server.

    I’ll spend some time over the weekend looking into this and will let you know what I find.

    I’m almost sure that the problem is that it’s a varchar field:
    So if you order it by the first char is:
    9
    8
    7
    6
    1
    1
    But the last tow are 10 and not 1 😉

    I solved it by changing in slickquiz-widgets.php line 39
    From:
    $scores = $quizModel->get_all_scores( $instance[‘quiz_id’], ‘score DESC, createdDate ASC’, “LIMIT ” . $instance[‘score_count’] );

    To:

    $scores = $quizModel->get_all_scores( $instance[‘quiz_id’], ‘convert(score, decimal) DESC, createdDate ASC’, “LIMIT ” . $instance[‘score_count’] );

    Dont’k know if it work with every quiz. It work with my only one (10 questions).

    Plugin Author jewlofthelotus

    (@jewlofthelotus)

    Thanks, @ciao121. I’ve seen it sort properly for some and improperly for others, I will definitely try out your solution and see if it works in all scenarios.

    Plugin Author jewlofthelotus

    (@jewlofthelotus)

    @ciao121 – Thanks for the suggestion, it seems to be working perfectly! I’ve pushed out an update with the fix included. Look for v1.2.373 and let me know if that resolves it for you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Top widget order’ is closed to new replies.