I have a quiz that requires a 100% pass rate. The quiz_stats module generates the 'status' chart incorrectly by not recognising 'pass' results of 100%.
In quiz_stats.admin.inc, function _get_quiz_status_chart():
181 // get the count value of results row above and below pass rate
182 $sql = "SELECT SUM(score > $pass_rate) AS no_pass, SUM(score < $pass_rate) AS no_fail, SUM(score = 0) AS no_incomplete FROM {quiz_node_results} WHERE vid = %d";
The fix that seemed to work for me was score > $pass_rate should be score >= $pass_rate because 100 > 100 == FALSE. That is:
$sql = "SELECT SUM(score >= $pass_rate) AS no_pass, SUM(score < $pass_rate) AS no_fail, SUM(score = 0) AS no_incomplete FROM {quiz_node_results} WHERE vid = %d";
Comments
Comment #1
djdevinInadvertently fixed in 7.x-5.x while upgrading the quiz_stats module.