From: jamiesensei Date: Wed, 30 Jul 2008 08:56:10 +0000 (+0000) Subject: MDL-14204 "Content for Quiz Statistics report table - Random_guess_score" fixed rando... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8ba751eec76c1e6bbcb35340b0f96532fe6b08ac;p=moodle.git MDL-14204 "Content for Quiz Statistics report table - Random_guess_score" fixed random guess score for random short answer matching question. --- diff --git a/question/type/randomsamatch/questiontype.php b/question/type/randomsamatch/questiontype.php index 8fb52dc387..0879a67c38 100644 --- a/question/type/randomsamatch/questiontype.php +++ b/question/type/randomsamatch/questiontype.php @@ -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 ////////////////////////////