WordPress.org

Support

Support » Plugins and Hacks » WP Survey And Quiz Tool » Multiple Answer Scoring

Multiple Answer Scoring

  • mystifier

    @mystifier

    Just updated to get benefit of Answer explanation but got the usual responses that scoring had stopped working for multiple answer questions.

    It has been reported just about every update but to bump it here (so that I can also find it easier next update!):

    In Lib/Wpsqrt/Shortcode.php
    Around line 359

    Replace:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    // TODO Insert ability to set point per answer scores
    
    $incorrect += $questionData["points"];
    $answerMarked['mark'] = "incorrect";

    With:

    if ($questionData["type"] == 'Multiple' && $questionData["points"] > 1)
     {
     $partial = floor(($questionData['points']*$subCorrect/$subNumOfCorrect)-$subIncorrect);
     $correct += $partial;
     $incorrect += ($questionData['points']-$partial);
     $answerMarked['mark'] = ($partial > 0)?'correct':'incorrect';
    
    } else {
     // Incorrect single answer question or multiple worth 1 point
     $incorrect += $questionData['points'];
     $answerMarked['mark'] = "incorrect";
    }

    http://wordpress.org/extend/plugins/wp-survey-and-quiz-tool/

  • The topic ‘Multiple Answer Scoring’ is closed to new replies.
Skip to toolbar