Ah, acutally, half this fix is already in Moodle 1.9 in a slightly different way, but not all of it. The bit in quiz_get_average_grade_for_questions is done using the ? : operator in the SQL, as
...
WHERE " .
($qmfilter?$qmfilter.' AND ':'') .
"qa.userid $usql AND " .
"qa.quiz = ? ".
"GROUPBY qns.questionid";
Tim Hunt
added a comment - Ah, acutally, half this fix is already in Moodle 1.9 in a slightly different way, but not all of it. The bit in quiz_get_average_grade_for_questions is done using the ? : operator in the SQL, as
...
WHERE " .
($qmfilter?$qmfilter.' AND ':'') .
"qa.userid $usql AND " .
"qa.quiz = ? ".
"GROUPBY qns.questionid";
Ah, acutally, half this fix is already in Moodle 1.9 in a slightly different way, but not all of it. The bit in quiz_get_average_grade_for_questions is done using the ? : operator in the SQL, as
... WHERE " . ($qmfilter?$qmfilter.' AND ':'') . "qa.userid $usql AND " . "qa.quiz = ? ". "GROUP BY qns.questionid";... WHERE " . ($qmfilter?$qmfilter.' AND ':'') . "qa.userid $usql AND " . "qa.quiz = ? ". "GROUP BY qns.questionid";