]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14204 "Content for Quiz Statistics report table - Random_guess_score" fixed rando...
authorjamiesensei <jamiesensei>
Wed, 30 Jul 2008 08:56:10 +0000 (08:56 +0000)
committerjamiesensei <jamiesensei>
Wed, 30 Jul 2008 08:56:10 +0000 (08:56 +0000)
question/type/randomsamatch/questiontype.php

index 8fb52dc38709f9d64985f631c2dda92817938da3..0879a67c387bb51f3a88abaf18a675ee39c3b49d 100644 (file)
@@ -279,13 +279,7 @@ class question_randomsamatch_qtype extends question_match_qtype {
      * calculate.
      */
     function get_random_guess_score($question) {
-        //Effectively $subquestions multi choice questions with equal weighting
-        //assuming a student has the intelligence to not select the same answer twice
-        //there is in each subquestion factorial($subquestions-1) chance of getting
-        //the answer right. There are factorial($subquestions) possible combinations of
-        //answers and it works out to an average grade of 1/$subquestions.
-        $subquestions = count($question->options->subquestions);
-        return 1/$subquestions;
+        return 1/$question->options->choose;
     }
 /// BACKUP FUNCTIONS ////////////////////////////